users@jax-rpc.java.net

Re: Problem deploying J2EE 1.4 standard web service on Weblogic 9.1

From: Rico Cruz <Roderico.Cruz_at_Sun.COM>
Date: Wed, 01 Feb 2006 09:55:07 -0800

Hi Velidanda,
I suggest that you use Netbeans to create J2EE 1.4 standard web
services. All the J2EE (JSR 109) artifacts are created for you
automatically. Here is the link to Netbeans:
http://www.netbeans.org/
In "Latest Downloads" download Netbeans IDE 5.0 RC2

Rico Cruz

Velidanda Srinivas wrote:
> Hi,
> I have problem deploying J2EE 1.4 standard Web Service created which
> is described in weblogic 9.1 server documentation.
> at following url
> _ _
>
> _http://e-docs.bea.com/wls/docs91/webserv/jsr109.html_
>
> _I have created the Jar file as mentioned in the documentation, but
> failing while deploying.
>
> Let me know how to fix the problem
>
> I have generated _wsdl_ and mapping files using wscompile tool
> provided by JWSDP 1.6, and packaging along with the application classes._
>
> _Note:Same jar file is successfully deployed on JBoss Server 4.0.2._
>
> _
> Following is my HelloBean.java file
>
> **************HelloBean.java --start******************
> /**
> *
> */
> package com.test;
>
> import _java_.rmi.RemoteException;
>
>
> /**
> *
> * <!-- begin-user-doc -->
> * A generated session bean
> * <!-- end-user-doc -->
> * *
> * <!-- begin-xdoclet-definition -->
> * @ejb.bean name="Hello"
> * description="A session bean named Hello"
> * display-name="Hello"
> * jndi-name="Hello"
> * type="Stateless"
> * transaction-type="Container"
> *
> * <!-- end-xdoclet-definition -->
> * @generated
> */
>
> public abstract class HelloBean implements javax.ejb.SessionBean {
>
> /**
> *
> * <!-- begin-xdoclet-definition -->
> * @ejb.create-method view-type="remote"
> * <!-- end-xdoclet-definition -->
> * @generated
> *
> * //TODO: Must provide implementation for bean create stub
> */
> public void ejbCreate() {
> }
>
> /**
> *
> * <!-- begin-xdoclet-definition -->
> * @ejb.interface-method view-type="remote"
> * <!-- end-xdoclet-definition -->
> * @generated
> *
> * //TODO: Must provide implementation for bean method stub
> */
> public String sayHello(String input) throws RemoteException {
> System.out.println(":input" +input );
> return "'" + input + "' to you too!";
> }
> }
>
> **************HelloBean.java --end******************
>
> ****************webservices.xml --start***************
> <?_xml_ version="1.0" encoding="UTF-8"?>
> <webservices xmlns="_<http://java.sun.com/xml/ns/j2ee>_"
> xmlns:xsi="_<http://www.w3.org/2001/XMLSchema-instance>_"
> xmlns:wsdl="_<http://EjbDeploy.org>_"
> xsi:schemaLocation="_<http://java.sun.com/xml/ns/j2ee>_
> _<http://www.bea.com/webservices/xsd/j2ee_web_services_1_1.xsd>_"
> version="1.1">
> <webservice-description>
> <webservice-description-name>HelloService</webservice-description-name>
> <wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
> <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
> <port-component>
> <port-component-name>HelloWs</port-component-name>
> <wsdl-port>HelloWsPort</wsdl-port>
> <service-endpoint-interface>com.test.HelloWs</service-endpoint-interface>
> <service-impl-bean>
> <ejb-link>HelloBean</ejb-link>
> </service-impl-bean>
> </port-component>
> </webservice-description>
> </webservices>
> ****************webservices.xml --end***************
>
> ****************HelloService.wsdl --start**************
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="HelloService"
> targetNamespace="_<http://localhost.org/>_"
> xmlns:tns="_<http://localhost.org/>_"
> xmlns="_<http://schemas.xmlsoap.org/wsdl/>_"
> xmlns:xsd="_<http://www.w3.org/2001/XMLSchema>_"
> xmlns:soap="_<http://schemas.xmlsoap.org/wsdl/soap/>_">
> <types/>
> <message name="HelloWs_sayHello">
> <part name="String_1" type="xsd:string"/></message>
> <message name="HelloWs_sayHelloResponse">
> <part name="result" type="xsd:string"/></message>
> <portType name="HelloWs">
> <operation name="sayHello" parameterOrder="String_1">
> <input message="tns:HelloWs_sayHello"/>
> <output message="tns:HelloWs_sayHelloResponse"/></operation></portType>
> <binding name="HelloWsBinding" type="tns:HelloWs">
> <soap:binding transport="_<http://schemas.xmlsoap.org/soap/http>_"
> style="rpc"/>
> <operation name="sayHello">
> <soap:operation soapAction=""/>
> <input>
> <soap:body
> encodingStyle="_<http://schemas.xmlsoap.org/soap/encoding/>_"
> use="encoded" namespace="_<http://localhost.org/>_"/></input>
> <output>
> <soap:body
> encodingStyle="_<http://schemas.xmlsoap.org/soap/encoding/>_"
> use="encoded"
> namespace="_<http://localhost.org/>_"/></output></operation></binding>
> <service name="HelloService">
> <port name="HelloWsPort" binding="tns:HelloWsBinding">
> <soap:address
> location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
>
> ****************HelloService.wsdl --end**************
>
> ****************mapping.xml --start******************
> <?xml version="1.0" encoding="UTF-8"?>
> <java-wsdl-mapping xmlns="_<http://java.sun.com/xml/ns/j2ee>_"
> xmlns:xsi="_<http://www.w3.org/2001/XMLSchema-instance>_"
> version="1.1" xsi:schemaLocation="_<http://java.sun.com/xml/ns/j2ee>_
> _<http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd>_">
> <package-mapping>
> <package-type>com.test</package-type>
> <namespaceURI>_<http://localhost.org/types>_</namespaceURI>
> </package-mapping>
> <package-mapping>
> <package-type>com.test</package-type>
> <namespaceURI>_<http://localhost.org/>_</namespaceURI>
> </package-mapping>
> <service-interface-mapping>
> <service-interface>com.test.HelloService</service-interface>
> <wsdl-service-name
> xmlns:serviceNS="_<http://localhost.org/>_">serviceNS:HelloService</wsdl-service-name>
> <port-mapping>
> <port-name>HelloWsPort</port-name>
> <java-port-name>HelloWsPort</java-port-name>
> </port-mapping>
> </service-interface-mapping>
> <service-endpoint-interface-mapping>
> <service-endpoint-interface>com.test.HelloWs</service-endpoint-interface>
> <wsdl-port-type
> xmlns:portTypeNS="_<http://localhost.org/>_">portTypeNS:HelloWs</wsdl-port-type>
> <wsdl-binding
> xmlns:bindingNS="_<http://localhost.org/>_">bindingNS:HelloWsBinding</wsdl-binding>
> <service-endpoint-method-mapping>
> <java-method-name>sayHello</java-method-name>
> <wsdl-operation>sayHello</wsdl-operation>
> <method-param-parts-mapping>
> <param-position>0</param-position>
> <param-type>java.lang.String</param-type>
> <wsdl-message-mapping>
> <wsdl-message
> xmlns:wsdlMsgNS="_<http://localhost.org/>_">wsdlMsgNS:HelloWs_sayHello</wsdl-message>
> <wsdl-message-part-name>String_1</wsdl-message-part-name>
> <parameter-mode>IN</parameter-mode>
> </wsdl-message-mapping>
> </method-param-parts-mapping>
> <wsdl-return-value-mapping>
> <method-return-value>java.lang.String</method-return-value>
> <wsdl-message
> xmlns:wsdlMsgNS="_<http://localhost.org/>_">wsdlMsgNS:HelloWs_sayHelloResponse</wsdl-message>
> <wsdl-message-part-name>result</wsdl-message-part-name>
> </wsdl-return-value-mapping>
> </service-endpoint-method-mapping>
> </service-endpoint-interface-mapping>
> </java-wsdl-mapping>
>
> ****************mapping.xml --end******************
>
> Getting follwing errors on the Administration Console while deploying.
>
> ****Error Messages on Server window --start****************_
>
> _
> <Jan 24, 2006 4:40:29 PM GMT+05:30> <Warning> <Deployer> <BEA-149004>
> <Failures
> were detected while initiating distribute task for application
> 'HelloService'.>
>
> <Jan 24, 2006 4:40:29 PM GMT+05:30> <Warning> <Deployer> <BEA-149078>
> <Stack tra
> ce for message 149004
> weblogic.application.ModuleException: Exception preparing module:
> EJBModule(Hell
> oService)
>
>
> Unable to deploy EJB: HelloService.jar from HelloService.jar:
>
> port component "HelloWs" is not found in wsdl.
>
>
> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:381)
>
> at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
> leListenerInvoker.java:90)
> at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
> oymentCallbackFlow.java:318)
> at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
> river.java:26)
> at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
> loymentCallbackFlow.java:53)
> Truncated. see log file for complete stacktrace
> port component "HelloWs" is not found in wsdl.
> at weblogic.wsee.deploy.WsEJBDeployListener.verifyWsdd(WsEJBDeployListen
> er.java:824)
> at weblogic.wsee.deploy.WsEJBDeployListener.doprepare(WsEJBDeployListene
> r.java:152)
> at weblogic.wsee.deploy.WsEJBDeployListener.prepare(WsEJBDeployListener.
> java:87)
> at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:
> 1248)
> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
>
> Truncated. see log file for complete stacktrace
> >
> <Jan 24, 2006 4:40:29 PM GMT+05:30> <Error> <Console> <BEA-240003>
> <Console enco
> untered the following error weblogic.application.ModuleException:
> Exception prep
> aring module: EJBModule(HelloService)
>
>
> Unable to deploy EJB: HelloService.jar from HelloService.jar:
>
> port component "HelloWs" is not found in wsdl.
>
>
> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:381)
>
> at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
> leListenerInvoker.java:90)
> at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
> oymentCallbackFlow.java:318)
> at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
> river.java:26)
> at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
> loymentCallbackFlow.java:53)
> at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
> loymentCallbackFlow.java:43)
> at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja
> va:620)
> at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
> river.java:26)
> at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j
> ava:231)
> at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme
> ntStateChecker.java:147)
> at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App
> ContainerInvoker.java:61)
> at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr
> eateAndPrepareContainer(ActivateOperation.java:183)
> at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
> Prepare(ActivateOperation.java:84)
> at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr
> epare(AbstractOperation.java:219)
> at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
> entPrepare(DeploymentManager.java:750)
> at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy
> mentList(DeploymentManager.java:1209)
> at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare
> (DeploymentManager.java:246)
> at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre
> pare(DeploymentServiceDispatcher.java:157)
> at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
> ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
> at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
> ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
> at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
> ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
> at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkMan
> agerImpl.java:518)
> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
> Caused by: java.lang.Throwable: Substituted for missing class port
> component "He
> lloWs" is not found in wsdl. -
> at weblogic.wsee.deploy.WsEJBDeployListener.verifyWsdd(WsEJBDeployListen
> er.java:824)
> at weblogic.wsee.deploy.WsEJBDeployListener.doprepare(WsEJBDeployListene
> r.java:152)
> at weblogic.wsee.deploy.WsEJBDeployListener.prepare(WsEJBDeployListener.
> java:87)
> at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:
> 1248)
> at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
>
> >
> **************Error Log -end****************************
>
> HelloService.jar file contents
>
> com/test/Hello.class
> com/test/HelloBean.class
> com/test/HelloHome.class
> com/test/HelloLocal.class
> com/test/HelloLocalHome.class
> com/test/HelloSession.class
> com/test/HelloUtil.class
> com/test/HelloWs.class
> META-INF/ejb-jar.xml_
>
> _META-INF/jboss.xml
> META-INF/mapping.xml
> META-INF/weblogic-ejb-jar.xml
> META-INF/webservices.xml
> META-INF/wsdl/HelloService.wsdl
>
> Please let me know how to fix this.
>
> Srinivas.
> _
>
> -----Original Message-----
> *From:* Joe Pederson [mailto:Joe.Pederson_at_firstlogic.com]
> *Sent:* 31 January 2006 22:08
> *To:* users_at_jax-rpc.dev.java.net
> *Subject:* RE: RE: Problem with REPLACE_WITH_ACTUAL_URL
>
> FYI...this was confirmed to be a bug in WebLogic Server. I was
> able to work
> around this issue by creating my own domain in WebLogic using all
> the defaults
> and then deploying my WAR file in this domain instead of the
> default sample
> domain supplied with WebLogic.
>
> -----Original Message-----
> *From:* Joe Pederson
> *Sent:* Wednesday, January 18, 2006 8:42 AM
> *To:* 'users_at_jax-rpc.dev.java.net'
> *Subject:* RE: RE: Problem with REPLACE_WITH_ACTUAL_URL
>
> Wannes,
>
> I am 'browsing' to it exactly as you suggest. So, apparently
> either there is a problem with the JAX-RPC servlet 'replacing'
> the address or it is something to do with WebLogic and/or its
> deployment files (I do have the endpoint defined in my
> jaxrpc-ri.xml file).
>
> Thanks.
>
> -----Original Message-----
> *From:* Sels Wannes [mailto:Wannes.Sels_at_cronos.be]
> *Sent:* Wednesday, January 18, 2006 3:06 AM
> *To:* users_at_jax-rpc.dev.java.net
> *Subject:* RE: Problem with REPLACE_WITH_ACTUAL_URL
>
> Hi Joe,
>
>
>
> You should not browse to the actual file, but let the
> jax-rpc service fill in the address.
>
> Go to http://server:port/war-name/endpoint?WSDL
>
> (you defined the endpoint in your jaxrpc-ri.xml file)
>
>
>
> Regards,
>
>
>
> Wannes
>
>
>
> ------------------------------------------------------------------------
>
> *From:* Joe Pederson [mailto:Joe.Pederson_at_firstlogic.com]
> *Sent:* dinsdag 17 januari 2006 17:53
> *To:* users_at_jax-rpc.dev.java.net
> *Subject:* Problem with REPLACE_WITH_ACTUAL_URL
>
>
>
> I've created and successfully deployed my WAR file on
> Tomcat, WebSphere, Sun App Server and .NET and am able to
> consume with several different clients (C++, Java, Perl,
> etc). However, when I deploy this WAR in WebLogic 9.0, it
> deploys ok but when I browse to the WSDL in IE, the WSDL
> still has the soap address as REPLACE_WITH_ACTUAL_URL
> instead of the actual address. Therefore, all of my client
> apps are failing when the web service attempts to connect
> to my application. Is this an issue with JAXRPC (or
> WebLogic)? Ideas on what I might be doing wrong?
>
> Thanks in advance for the help.
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by MessageLabs.
> ________________________________________________________________________
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by MessageLabs.
> ________________________________________________________________________