users@jax-rpc.java.net

Problem deploying J2EE 1.4 standard web service on Weblogic 9.1

From: Velidanda Srinivas <srinivas.velidanda_at_singularity.co.uk>
Date: Wed, 1 Feb 2006 04:45:55 -0000

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
<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-servi
ce-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-typ
e>
<wsdl-binding
xmlns:bindingNS="<http://localhost.org/>">bindingNS:HelloWsBinding</wsdl-bin
ding>
<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-m
essage>
<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
<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.
________________________________________________________________________