Implementation of ws-secureconversation in webservice
I have to implement a message level secured webservice which wud cater to client on .NET. We have weblogic 10.3.6. Through the tutorials i have configured my server with "weblogic.wsee.security.wssc.v13.sct.ServerSCCredentialProvider" , "weblogic.wsee.security.wssc.v13.dk.DKCredentialProvider", weblogic.xml.crypto.wss.UNTCredentialProvider", and "weblogic.wsee.security.bst.ServerBSTCredentialProvider" credential providers and used policy as policy:Wssp1.2-Wssc1.3-Bootstrap-Wss1.1.xml in the webservice.
While invoking the service froma stand-alone client , I get an exception "<WSEE:15>Context token does not have a shared secret that is required for deriving secret keys<DKTokenBase.getSecretKey:240>".
Following a code snippet from the client code:-
CredentialProvider cp = new ClientBSTCredentialProvider( "plcom.jks", "1234", "com", "1234", "JKS");
credProviders.add(cp);
stub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
stub._setProperty(StubPropertyBSTCredProv.SERVER_ENCRYPT_CERT, CertUtils.getCertificate(serverCertFile )); //serverCert));
stub._setProperty(WlMessageContext.SCT_LIFETIME_PROPERTY, new Long( 2 * 60 * 60 * 1000L));
stub._setProperty(WSSecurityContext.TRUST_MANAGER,
new TrustManager()
public boolean certificateCallback(X509Certificate[] chain, int validateErr)
{ return true; }
Please guide me how to add the shared key to the context in otrder to successfully invoke the service.
are u using any tool to generate ur java files from wsdl...??
Similar Messages
-
How to implement Queuing of WebService call.
I have to implement a queuing mechanism for webservice.
The scenario is like a user will invoke the client from his sytem(name:A), this webservice call is received by a server (name:B).
The webservice will internally call a third system(name:C) , but only one instance or only one call to System C is allowed.
So system B can get any number of webservice calls but can only invoke system C one at a time.
The webservice has to be a sync webservice.
Any help forthese issue is highly appreciated.Hi Anton,
In WD ABAP, if we want to reimport the service call, we need to follow the same steps which we follow to create a service call.
One thing to notice is that wizard does not allow to give the same method name which we gave/system proposed during the last time service call creation. Hence in the second time when we reimport the service call provide all details and new method name. A new method will be created in Controller (if we use existing controller). During adapting the nodes new nodes/attributes will be created.
Hence the best approach is to before reimporting the service call is to delete the context, attributes and the method created during the previous service call creation.
Best regards,
Suresh -
Implementing Webservices in Flash CS5
Hello I am looking for a walkthrough for implementing a call for a webservice from an swf file, I cant find any..
What specifically can't you find? Searching Google for 'AS3 web service' yields tons of info, and examples. Essentially though, you simply use URLLoader to call the service and pass your data. A complete listener attached to the loader allows you to get data back from the service.
-
Implementing Asynchronous comm. in WebService & its client
Hi Friends,
I am trying to implement Asynchronous communication between a WebService & its Client. I am using Sun JWSDP 1.6.
My doubts are:
1. Is there any difference in WSDL? If yes, then What?
2. What are the differences in WSDL for
a. Client Call-Back or
b. Polling
3. How to use JWSDP to implement such communication?
Thanx in advance.Thanks swatdba,
I came to know later that JWSDP 1.6 doesnt have support for Asynchrony, but my concern is about WSDL.
* What needs to be published in WSDL for Asynchronous support in WebService?
* I studied WSDL of an Asynchronous BPEL process. It has
2 Service endpoint definition,
2 Ports and
2 Bindings
- One for Request and the other for CallBack
Can anyone explain me what does it mean? Is there any way to create client for that (other than JAX-WS 2.O)? -
Scenario XI - HTTP - Webservice - XI - RFC - SAP R/3
Hi,
i have the scenario:
Sending request to an Webservice per HTTPS and catch the response. This is working fine. In transaction sxmb_moni i can see the answer as XML.
I have implemented the scenario response from webservice mapped into RFC-Function and send into SAP R/3. But i have to run this manuell! How can i run this automatically after getting the response from the Webservice.
Thanks for any answere,
MaxHi Max,
You could look at these threads :
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
http://help.sap.com/saphelp_nw04/helpdata/en/11/13283fd0ca8443e10000000a114084/content.htm
BPM: Multiple synchronous receivers
Synchronous - Synchronous BPM
Synchronous BPM start
Regards,
Laurent.
Reward points if helpfull. -
Problem while Consuming Java Webservice from WCF client
Hi,
I am trying to Consume Java Webservice from WCF client.The webservice main functionality is digital data management.The client can Query Digital data and upload digital data by calling webservice methods.Problem is when i am trying to call webmethod from WCF client its giving "Unrecognised message versions".I have no idea about how the message objects are processed at serverside.but at server side they have used JAXP for XML document parsing.
The response content type is Multipart/related and applicatio/XOP+XML.
Can u plz help me how to handle this situation.I have minimum knowledge in Java WS architecture.Basically i am .Net programmer.
Can U please guide me in a proper way to resolve the problem.Hi Abinash,
I have the same problem. Have you solve that problem?
I am using a java program to call a webservice too. And I have generated the client proxy definition for Stand alone proxy using NWDS. When I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
MIDadosPessoaisSyncService service = new MIDadosPessoaisSyncServiceImpl();
MIDadosPessoaisSync port = service.getLogicalPort("MIDadosPessoaisSyncPort");
port._setProperty("javax.xml.rpc.security.auth.username","xpto");
port._setProperty("javax.xml.rpc.security.auth.password","xpto");
String out = port.MIDadosPessoaisSync("xpto", "xpto");
System.out.println(out);
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>The result of the WS is correct!!!</b>
The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
This method has a constructor name MIDadosPessoaisSync.java
The import javax.xml.rpc.holders is never used MIDadosPessoaisSyncBindingStub.java
The import javax.xml.rpc.encoding is never used MIDadosPessoaisSyncBindingStub.java
The constructor BaseRuntimeException(ResourceAccessor, String, Throwable) is deprecated MIDadosPessoaisSyncBindingStub.java
It is very similar with your problem, could you help me?
Thanks
Gustavo Freitas -
Problem while calling a Webservice from a Stand alone java program
Hello Everyone,
I am using a java program to call a webservice as follows. For this I have generated the client proxy definition for Stand alone proxy using NWDS.
Now when I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
public class ZMATRDESCProxyClient {
public static void main(String[] args) throws Exception {
Z_MATRDESC_WSDService ws = new Z_MATRDESC_WSDServiceImpl();
Z_MATRDESC_WSD port = (Z_MATRDESC_WSD)ws.getLogicalPort("Z_MATRDESC_WSDSoapBinding",Z_MATRDESC_WSD.class);
String res = port.zXiTestGetMatrDesc("ABCD134");
System.out.print(res);
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>Material Not Found</b> -
> This is the output of webservice method and it is right.
Can any one please let me know why I am getting the warning and error message and how can I fix this.
Thanks
AbinashHi Abinash,
I have the same problem. Have you solve that problem?
I am using a java program to call a webservice too. And I have generated the client proxy definition for Stand alone proxy using NWDS. When I call the method of the webservice I am getting the correct result but along with the result I am getting one error and one warning message in the output.
The java code to call the webservice is as follows.
MIDadosPessoaisSyncService service = new MIDadosPessoaisSyncServiceImpl();
MIDadosPessoaisSync port = service.getLogicalPort("MIDadosPessoaisSyncPort");
port._setProperty("javax.xml.rpc.security.auth.username","xpto");
port._setProperty("javax.xml.rpc.security.auth.password","xpto");
String out = port.MIDadosPessoaisSync("xpto", "xpto");
System.out.println(out);
The result I am getting is :
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
<b>The result of the WS is correct!!!</b>
The Java project does not have any warning. But the stand alone proxy project has following warnings associated with it.
This method has a constructor name MIDadosPessoaisSync.java
The import javax.xml.rpc.holders is never used MIDadosPessoaisSyncBindingStub.java
The import javax.xml.rpc.encoding is never used MIDadosPessoaisSyncBindingStub.java
The constructor BaseRuntimeException(ResourceAccessor, String, Throwable) is deprecated MIDadosPessoaisSyncBindingStub.java
It is very similar with your problem, could you help me?
Thanks
Gustavo Freitas -
Error in Consuming Portal Webservice
Hi ,
I created a portal web service(RetrieveAndValidateUserService) and then consumed this portal service in an AbstractPortal Component application(RetrieveValidateUserComp).
On deploying that application on portal I get the following error -
#1.5#001372247F6F00640000001C000011600004542B1E4EA3FD#1218444075594#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#Administrator#34878##PUNITP84649D.ad_SYN_3160950#Administrator#2b7b0eb0678111ddb00a001372247f6f#SAPEngine_Application_Thread[impl:3]_4##0#0#Error#1#/System/Server#Java###Exception ID:02:11_11/08/08_0002_3160950
[EXCEPTION]
#1#com.sapportals.portal.prt.component.PortalComponentException: Error in init method
Component : RetrieveAndVAlidateUser.RetrieveValidateUserComp
at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:267)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:312)
at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:385)
at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:435)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.pseg.test.webservice.RetrieveValidateUserComp of Portal Component RetrieveAndVAlidateUser.RetrieveValidateUserComp because: Could not instantiate implementation class
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:269)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)
... 26 more
Caused by: com.sapportals.portal.prt.core.broker.PortalApplicationNotFoundException: Could not find portal application RetrieveAndValidateUserService
at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:415)
at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:387)
at com.sapportals.portal.prt.core.broker.PortalApplicationItem._refresh(PortalApplicationItem.java:507)
at com.sapportals.portal.prt.core.broker.PortalApplicationItem.getCoreLoader(PortalApplicationItem.java:1360)
at com.sapportals.portal.prt.core.broker.PortalComponentItem.getClassLoader(PortalComponentItem.java:569)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getClassLoader(PortalComponentItemFacade.java:102)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:228)
... 30 more
1. I added a Private Sharing Reference Property in portalapps.xml of the application -
<application-config>
<property name="PrivateSharingReference" value="com.pseg.webservice.RetrieveAndValidateUser"/>
</application-config>
2. I modified the Java-Build Path to include the Portal Service Application.
3. I deployed the Webservice par on the portal. I can see the service listed under Applications in
System Administration->System configuration->Service Configuration.
Is there anything i am missing or doing incorrectly?
Points will be promptly awarded for helpful answers.Hi Lokesh
I created a Portal Service consuming a webservice.
It turns out the Private Sharing Reference that i gave had some fault. That's corrected now.
Now on deploying the Portal Application I created for accessing the service, i am getting the following error -
java.lang.Exception: The parameter Accounts is null before the serialization but in WSDL definition this field cannot be null
Here, we need to pass this parameter "Accounts" as NULL only, for test purpose.
Points will be awarded generously in case of helpful answer. -
Deploying a webservice on WLS 9.1 and got an wsdl error.
Hi,
I hoped it is then right usergroup to publish the following question.
I'm trying to deploy a EJB webservice on a WLS 9.1.
But I got the following error message:
[java] port component "SystemServiceEndpointPort" is not found in wsdl.
It's simple JAX-RPC based webservice where a SessionBean method is used as
the service implementation. The same configuration (webservice.xml,
jaxrpc-mapping-SystemService.xml, SystemService.wsdl) works fine under JBoss 4.0, but not with
WLS 9.1. Maybe it's a simple configuration error and I hope someone can help.
I haved remembered the namespace in the webservices.xml file: <wsdl-port>wsdl:SystemServiceEndpointPort</wsdl-port> and also defined et in the top of the file.
Regards
Torben
<b>webservices.xml</b>
<webservices
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://www.organisator.dk"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd"
version="1.1">
<webservice-description>
<icon></icon>
<webservice-description-name>SystemService</webservice-description-name>
<wsdl-file>META-INF/wsdl/SystemService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping-SystemService.xml</jaxrpc-mapping-file>
<port-component>
<icon></icon>
<port-component-name>SystemServiceEndpointPort</port-component-name>
<wsdl-port>wsdl:SystemServiceEndpointPort</wsdl-port>
<service-endpoint-interface>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint</service-endpoint-interface>
<service-impl-bean>
<ejb-link>SCSystem</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
</webservices>
<b>weblogic-webservices.xml</b>
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-webservices xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<webservice-description>
<webservice-description-name>SystemService</webservice-description-name>
<port-component>
<port-component-name>SystemServiceEndpointPort</port-component-name>
<service-endpoint-address>
<webservice-contextpath>/winnie</webservice-contextpath>
<webservice-serviceuri>/SystemService</webservice-serviceuri>
</service-endpoint-address>
</port-component>
</webservice-description>
</weblogic-webservices>
<b>ejb-jar.xml</b>
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
<description><![CDATA[No Description.]]></description>
<display-name>Generated by XDoclet</display-name>
<enterprise-beans>
<!-- Session Beans -->
<session >
<description><![CDATA[System information handler]]></description>
<display-name>SCSystem</display-name>
<ejb-name>SCSystem</ejb-name>
<home>dk.organisator.winnie.system.ejbsystem.services.SCSystemHome</home>
<remote>dk.organisator.winnie.system.ejbsystem.services.SCSystemRemote</remote>
<service-endpoint>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint</service-endpoint>
<ejb-class>dk.organisator.winnie.system.ejbsystem.services.SCSystemBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
<b>SystemService.wsdl</b>
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="SystemService" targetNamespace="http://organisator.dk/winnie/wsdl" xmlns:tns="http://organisator.dk/winnie/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://organisator.dk/winnie/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema targetNamespace="http://organisator.dk/winnie/types" xmlns:tns="http://organisator.dk/winnie/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="getXxxxxxxxx">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequence></complexType>
<complexType name="getXxxxxxxxxResponse">
<sequence>
<element name="result" type="string" nillable="true"/></sequence></complexType>
<complexType name="ping">
<sequence/></complexType>
<complexType name="pingResponse">
<sequence>
<element name="result" type="int"/></sequence></complexType>
<complexType name="setXxxxxxxx">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequence></complexType>
<complexType name="setXxxxxxxxResponse">
<sequence/></complexType>
<element name="getXxxxxxxxx" type="tns:getXxxxxxxxx"/>
<element name="getXxxxxxxxxResponse" type="tns:getXxxxxxxxxResponse"/>
<element name="ping" type="tns:ping"/>
<element name="pingResponse" type="tns:pingResponse"/>
<element name="setXxxxxxxx" type="tns:setXxxxxxxx"/>
<element name="setXxxxxxxxResponse" type="tns:setXxxxxxxxResponse"/></schema></types>
<message name="SystemServiceEndpoint_getXxxxxxxxx">
<part name="parameters" element="ns2:getXxxxxxxxx"/></message>
<message name="SystemServiceEndpoint_getXxxxxxxxxResponse">
<part name="result" element="ns2:getXxxxxxxxxResponse"/></message>
<message name="SystemServiceEndpoint_ping">
<part name="parameters" element="ns2:ping"/></message>
<message name="SystemServiceEndpoint_pingResponse">
<part name="result" element="ns2:pingResponse"/></message>
<message name="SystemServiceEndpoint_setXxxxxxxx">
<part name="parameters" element="ns2:setXxxxxxxx"/></message>
<message name="SystemServiceEndpoint_setXxxxxxxxResponse">
<part name="result" element="ns2:setXxxxxxxxResponse"/></message>
<portType name="SystemServiceEndpoint">
<operation name="getXxxxxxxxx">
<input message="tns:SystemServiceEndpoint_getXxxxxxxxx"/>
<output message="tns:SystemServiceEndpoint_getXxxxxxxxxResponse"/></operation>
<operation name="ping">
<input message="tns:SystemServiceEndpoint_ping"/>
<output message="tns:SystemServiceEndpoint_pingResponse"/></operation>
<operation name="setXxxxxxxx">
<input message="tns:SystemServiceEndpoint_setXxxxxxxx"/>
<output message="tns:SystemServiceEndpoint_setXxxxxxxxResponse"/></operation></portType>
<binding name="SystemServiceEndpointBinding" type="tns:SystemServiceEndpoint">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getXxxxxxxxx">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
<operation name="ping">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
<operation name="setXxxxxxxx">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>
<service name="SystemService">
<port name="SystemServiceEndpointPort" binding="tns:SystemServiceEndpointBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
<b>jaxrpc-mapping-SystemService.xml</b>
<?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>dk.organisator.winnie.system.ejbsystem.services</package-type>
<namespaceURI>http://organisator.dk/winnie/types</namespaceURI>
</package-mapping>
<package-mapping>
<package-type>dk.organisator.winnie.system.ejbsystem.services</package-type>
<namespaceURI>http://organisator.dk/winnie/wsdl</namespaceURI>
</package-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_ping_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:pingResponse</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>result</java-variable-name>
<xml-element-name>result</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_getXxxxxxxxx_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:getXxxxxxxxx</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>String_1</java-variable-name>
<xml-element-name>String_1</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_setXxxxxxxx_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:setXxxxxxxxResponse</root-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_setXxxxxxxx_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:setXxxxxxxx</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>String_1</java-variable-name>
<xml-element-name>String_1</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_ping_RequestStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:ping</root-type-qname>
<qname-scope>complexType</qname-scope>
</java-xml-type-mapping>
<java-xml-type-mapping>
<java-type>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint_getXxxxxxxxx_ResponseStruct</java-type>
<root-type-qname xmlns:typeNS="http://organisator.dk/winnie/types">typeNS:getXxxxxxxxxResponse</root-type-qname>
<qname-scope>complexType</qname-scope>
<variable-mapping>
<java-variable-name>result</java-variable-name>
<xml-element-name>result</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
<service-interface-mapping>
<service-interface>dk.organisator.winnie.system.ejbsystem.services.SystemService</service-interface>
<wsdl-service-name xmlns:serviceNS="http://organisator.dk/winnie/wsdl">serviceNS:SystemService</wsdl-service-name>
<port-mapping>
<port-name>SystemServiceEndpointPort</port-name>
<java-port-name>SystemServiceEndpointPort</java-port-name>
</port-mapping>
</service-interface-mapping>
<service-endpoint-interface-mapping>
<service-endpoint-interface>dk.organisator.winnie.system.ejbsystem.services.SystemServiceEndpoint</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS="http://organisator.dk/winnie/wsdl">portTypeNS:SystemServiceEndpoint</wsdl-port-type>
<wsdl-binding xmlns:bindingNS="http://organisator.dk/winnie/wsdl">bindingNS:SystemServiceEndpointBinding</wsdl-binding>
<service-endpoint-method-mapping>
<java-method-name>getXxxxxxxxx</java-method-name>
<wsdl-operation>getXxxxxxxxx</wsdl-operation>
<wrapped-element/>
<method-param-parts-mapping>
<param-position>0</param-position>
<param-type>java.lang.String</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://organisator.dk/winnie/wsdl">wsdlMsgNS:SystemServiceEndpoint_getXxxxxxxxx</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://organisator.dk/winnie/wsdl">wsdlMsgNS:SystemServiceEndpoint_getXxxxxxxxxResponse</wsdl-message>
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
<service-endpoint-method-mapping>
<java-method-name>ping</java-method-name>
<wsdl-operation>ping</wsdl-operation>
<wrapped-element/>
<wsdl-return-value-mapping>
<method-return-value>int</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://organisator.dk/winnie/wsdl">wsdlMsgNS:SystemServiceEndpoint_pingResponse</wsdl-message>
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
<service-endpoint-method-mapping>
<java-method-name>setXxxxxxxx</java-method-name>
<wsdl-operation>setXxxxxxxx</wsdl-operation>
<wrapped-element/>
<method-param-parts-mapping>
<param-position>0</param-position>
<param-type>java.lang.String</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://organisator.dk/winnie/wsdl">wsdlMsgNS:SystemServiceEndpoint_setXxxxxxxx</wsdl-message>
<wsdl-message-part-name>String_1</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
</service-endpoint-method-mapping>
</service-endpoint-interface-mapping>
</java-wsdl-mapping>the problem is with the xmlns:wsdl="http://www.organisator.dk" line in your webservices.xml. It does not match the namespace of the corresponding PortType in your wsdl: targetNamespace="http://organisator.dk/winnie/wsdl"
-
Hi,
I'm trying to deploy a simple EJB webservice example on WLS 9.1. The appc
compile works fine, but the server deployment throw the following error
message:
[java] port component "Hello" is not found in wsdl.
It's simple JAX-RPC based webservice where a SessionBean method is used as
the service implementation. The same configuration (webservice.xml,
mapping.xml and HelloService.wsdl) works fine under JBoss 4.0, but not with
WLS 9.1. Maybe it's a simple configuration error and someone can help.
Regards
Guido
Appendix
webservice.xml
<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.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>Hello</port-component-name>
<wsdl-port>HelloPort</wsdl-port>
<service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
t-interface>
<service-impl-bean>
<ejb-link>HelloBean</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
</webservices>
mapping.xml
<?xml version="1.0" encoding="UTF-8"?>
<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.jcoffee.components.ws</package-type>
<namespaceURI>http://ws.components.jcoffee.com/types</namespaceURI>
</package-mapping>
<package-mapping>
<package-type>com.jcoffee.components.ws</package-type>
<namespaceURI>http://ws.components.jcoffee.com/</namespaceURI>
</package-mapping>
<service-interface-mapping>
<service-interface>com.jcoffee.components.ws.HelloService</service-interface
>
<wsdl-service-name
xmlns:serviceNS="http://ws.components.jcoffee.com/">serviceNS:HelloService</
wsdl-service-name>
<port-mapping>
<port-name>HelloPort</port-name>
<java-port-name>HelloPort</java-port-name>
</port-mapping>
</service-interface-mapping>
<service-endpoint-interface-mapping>
<service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
t-interface>
<wsdl-port-type
xmlns:portTypeNS="http://ws.components.jcoffee.com/">portTypeNS:Hello</wsdl-
port-type>
<wsdl-binding
xmlns:bindingNS="http://ws.components.jcoffee.com/">bindingNS:HelloBinding</
wsdl-binding>
<service-endpoint-method-mapping>
<java-method-name>hello</java-method-name>
<wsdl-operation>hello</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://ws.components.jcoffee.com/">wsdlMsgNS:Hello_hello</w
sdl-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://ws.components.jcoffee.com/">wsdlMsgNS:Hello_helloRes
ponse</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>
HelloService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HelloService"
targetNamespace="http://ws.components.jcoffee.com/"
xmlns:tns="http://ws.components.jcoffee.com/"
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="Hello_hello">
<part name="String_1" type="xsd:string"/>
</message>
<message name="Hello_helloResponse">
<part name="result" type="xsd:string"/>
</message>
<portType name="Hello">
<operation name="hello" parameterOrder="String_1">
<input message="tns:Hello_hello"/>
<output message="tns:Hello_helloResponse"/>
</operation>
</portType>
<binding name="HelloBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<operation name="hello">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
</input>
<output>
<soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
and last but not least the ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>JCoffee web service sample</display-name>
<enterprise-beans>
<session>
<ejb-name>HelloBean</ejb-name>
<service-endpoint>com.jcoffee.components.ws.Hello</service-endpoint>
<ejb-class>com.jcoffee.components.ws.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked/>
<method>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>Hi again,
I got it - i've forgot the namespace prefix for the wsdl-port.
Now it works.
Thanks!
"Ben" <[email protected]> schrieb im Newsbeitrag
news:[email protected]...
Hi,
I'm trying to deploy a simple EJB webservice example on WLS 9.1. The appc
compile works fine, but the server deployment throw the following error
message:
[java] port component "Hello" is not found in wsdl.
It's simple JAX-RPC based webservice where a SessionBean method is used as
the service implementation. The same configuration (webservice.xml,
mapping.xml and HelloService.wsdl) works fine under JBoss 4.0, but notwith
WLS 9.1. Maybe it's a simple configuration error and someone can help.
Regards
Guido
Appendix
webservice.xml
<webservices xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.ibm.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>Hello</port-component-name>
<wsdl-port>HelloPort</wsdl-port>
<service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
t-interface>
<service-impl-bean>
<ejb-link>HelloBean</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
</webservices>
mapping.xml
<?xml version="1.0" encoding="UTF-8"?>
<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.jcoffee.components.ws</package-type>
<namespaceURI>http://ws.components.jcoffee.com/types</namespaceURI>
</package-mapping>
<package-mapping>
<package-type>com.jcoffee.components.ws</package-type>
<namespaceURI>http://ws.components.jcoffee.com/</namespaceURI>
</package-mapping>
<service-interface-mapping>
<service-interface>com.jcoffee.components.ws.HelloService</service-interface
>>
<wsdl-service-name
xmlns:serviceNS="http://ws.components.jcoffee.com/">serviceNS:HelloService</
wsdl-service-name>
<port-mapping>
<port-name>HelloPort</port-name>
<java-port-name>HelloPort</java-port-name>
</port-mapping>
</service-interface-mapping>
<service-endpoint-interface-mapping>
<service-endpoint-interface>com.jcoffee.components.ws.Hello</service-endpoin
t-interface>
<wsdl-port-type
xmlns:portTypeNS="http://ws.components.jcoffee.com/">portTypeNS:Hello</wsdl-
port-type>
<wsdl-binding
xmlns:bindingNS="http://ws.components.jcoffee.com/">bindingNS:HelloBinding</
wsdl-binding>
<service-endpoint-method-mapping>
<java-method-name>hello</java-method-name>
<wsdl-operation>hello</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://ws.components.jcoffee.com/">wsdlMsgNS:Hello_hello</w
sdl-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://ws.components.jcoffee.com/">wsdlMsgNS:Hello_helloRes
ponse</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>
HelloService.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="HelloService"
targetNamespace="http://ws.components.jcoffee.com/"
xmlns:tns="http://ws.components.jcoffee.com/"
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="Hello_hello">
<part name="String_1" type="xsd:string"/>
</message>
<message name="Hello_helloResponse">
<part name="result" type="xsd:string"/>
</message>
<portType name="Hello">
<operation name="hello" parameterOrder="String_1">
<input message="tns:Hello_hello"/>
<output message="tns:Hello_helloResponse"/>
</operation>
</portType>
<binding name="HelloBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
>
>
<operation name="hello">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
</input>
<output>
<soap:body use="literal" namespace="http://ws.components.jcoffee.com/"/>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
and last but not least the ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>JCoffee web service sample</display-name>
<enterprise-beans>
<session>
<ejb-name>HelloBean</ejb-name>
<service-endpoint>com.jcoffee.components.ws.Hello</service-endpoint>
<ejb-class>com.jcoffee.components.ws.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked/>
<method>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar> -
Hey ,
I have an application which requires to talk to 2 different published webservices
from 2 different systems. Now instead od designing static webservice clients for
each of these systems(which would involve having separate proxy jars etc),
I am planning to design a dynamic webservice locator and invoker....
I know that we can have webservice clients which are dynamic to the extent that
we can create proxy objects at runtime once we know the endpoint WSDL..
eg:
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName =new QName targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
QName portName = new QName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
QName operationName = new QName("urn:xmethods-delayed-quotes","getQuote");
URL wsdlLocation = new URL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call Call call = service.createCall(portName, operationName);
My question on this...if I have a dynamic approach like the above what are the
pros and cons..I guess it would surely have more overhead compared to a static
client...?
Secondly ,is it even feasible to design a dynamic client in such a way that the
endpoint WSDL could also be an unknown and my generic client would also locate
the end-point dynamically and then invoke dynamic calls as above...
If anybody can share their insights on a dynamic webservice client , I would really
appreciate it...
Thanx,
Krish
KRISH.VENKATARAMAN
Senior Technology Analyst
Bank of America Corp.
Email:[email protected]Hi Krish,
In WSDL, the data types passed between applications are described in schema
and
this is key for interop. I dont know of any standard/natural mapping for
values types,
object reference, etc in a binary protocol (like JRMP, IIOP) to schema. For
eg:
say there is serializable object Foo, which is the argument to a remote
method in RMI.
Object Foo can have data + behavior. It may be possible (not always, i
think) to
describe the data in Foo as schema, but how can one describe the behavior?
So, if WSDL is the only contract between the server and client (key
requirement
for interop), then IMHO RMI can not be described by WSDL.
Also, WSDL was designed for future extensions and does not map well to a
programming API. WSIF trys to expose all the gory WSDL details and its apis
are very clumsy.
These were the two main reason to vote it down at JAX-RPC EC.
I am attaching an example that shows, how to introspect WSDL and invoke
a method using JAX-RPC (with little extension to the std api). Also, it
shows
how to handle complex type without data binding. Will this solve your
problem?
I am very interested to get your feedback on this.
BTW, This example will only work with WLS 8.1.
regards,
-manoj
"Krish Venkataraman" <[email protected]> wrote in message
news:[email protected]...
>
>
Mike...thanx for the inputs...
As per ur suggestion...I have taken this offline and mailed u [email protected]
also....lemme know if thatz cool...
there are my observations..lemme know what am i missing..
1) The main difference I see between JAX-RPC and WSIF, is that with WSIFclient
it is easier to port to services talking
via other ports like RMI,IIOP etc...where as JAX-RPC is understandsonly SOAP(atleast
for now).
2) Lets assume for the time-being that I would be interested only to talkto services
talking SOAP.
Then why do I need WSIF ?
3) I can have a JX-RPC client , I can have a similar generic(reflection)code
for built-in/primitive datatypes and for
complex datatypes I anywayz would be doing the same thing(requiringthe java
representation of the datatype unless I use
something like JROM or something which I do not want to) in JAX-RPC orWSIF.
>
4) As far as syncronous or asyncronous invocation is concerned , myunderstanding
is that my client call is going to remain the
same ..the service provider is going to either use message-oriented orRPC
on his side...
Again assuming that I am interested only with services talking SOAP, thiscould
be my generic client invocation design
Background is that my client is going to run from within a WLS70sp1
Actors:
a) webSevice1ClientSessionBean : This will be a stateless session beanwhich might
have knowledge about webSevice1's end-point ,
complex dataTypes if any.
(There would be other session beans like this which would haveknowledge about
other specific webservice)
b) GenericWebServiceInvoker : This will have knowledge about everythingwithin
the webservice-standards/protocols.
eg:
//set weblogic ServiceFactory
System.setProperty( "javax.xml.rpc.ServiceFactory",
"weblogic.webservice.core.rpc.ServiceFactoryImpl" );
//create service factory
ServiceFactory factory = ServiceFactory.newInstance();
//define qnames
String targetNamespace = "http://soapinterop.org/";
QName serviceName = new QName( targetNamespace, "SimpleTest" );
QName portName = new QName( targetNamespace, "SimpleTestSoap" );
QName operationName = new QName( "http://soapinterop.org/",
"echoStruct" );
//create service
Service service = factory.createService( serviceName );
TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping mapping = registry.getTypeMapping(
SOAPConstants.URI_NS_SOAP_ENCODING );
mapping.register( SOAPElement.class,
new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
new SOAPElementCodec(),
new SOAPElementCodec() );
//create call
Call call = service.createCall();
//set port and operation name
call.setPortTypeName( portName );
call.setOperationName( operationName );
call.addParameter( "inputStruct",
new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
ParameterMode.IN);
All parameter values specific to a particular webservice likeQName,targetNameSpace
etc will be sent to this invoker by
webSevice1ClientSessionBean. The GenericWebServiceInvoker will invokethe
service
(using reflection for primitive/builtin types) and alwayz accept anobject
from the service operation and just return
that "object" back the webSevice1ClientSessionBean.ThewebSevice1ClientSessionBean
will know how to interpret the
complexdataType or builtInDatatype whichever is returned.TheGenericWebServiceInvoker
will not have any application
specific knowledge...it will just have knowledge about how todiscover, invoke
any SOAP webservice...
Somewhere in the beginning of GenericWebServiceInvoker I will use JAXRto
discover services from UDDI if needed.
This way I will have a generic webservice client invocation frameworkwhich
can invoke any service which talks SOAP.
Now lemme know how the above picture looks and what is missing...
I have some questions :
1) Incase of complex dataTypes, I will have itz XML representation inthe
publisher's WSDL and the publisher will give
me the java representation of the complex dataType.But how does myclient
JAX-RPC know how to map the XML
to the java representation unless I specify the mapping somewhere?Does
the TypeMapping/TypeMappingRegistry do this ?
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
You know, it's really cool to hear guys thinking things through, before
they "jump
on a bandwagon" :-)
Anyway, I suspect that the performance overhead of doing reflection,
and heavy
server-side code intrusion, is what has made a lot of developers balk
at using
WSIF. I would check out the IBM newsgroups, to see what the general
developer
sentiment is on WSIF.
To achieve any sort of decent performance with JAX-RPC based webservices,
you
need to do a fair amount of optimization/tuning on both the client and
server
side. I recommend setting up your own "lab environment" for doing these,
so you
can see exactly what's making things improve/degrade. If you are really
interested
in this topic, we should talk about it "off-line".
In general, the more "dynamic" things are on the client side, the slower
things
will be, the more you really need to question if you really need them
to be dynamic
:-) Does making it "dynamic" really offer something that you can't get
from a
"static" version? If not, who's really benefiting here. I mean, com'n.
All you
really want to do is invoke an operation, right? By the time you get
all the information
it takes to do a dynamic invocation (i.e. port, target namespace, data
type for
input argument, serializer/deserializer for each non-built-in data type,
etc.),
your client looks like you are trying to boot a PDP-11! LOL! For those
of you
who don't know what a PDP-11 is, it's an early computer (from the'60-'70),
that
you actually had to use switches to create the "binary instructions"
to boot it
up!
From a PM's (product manager's) perpective, I wouldn't even let thedevelopers
modify "working" EJBs to expose them as a web service. Alarm bells should
go off
in your head, if you have to modify existing server-side code to expose
a company
asset as a web service.
Response to OT comment: WebLogic Server 7.0 uses its own implementation
of JAX-RPC
1.0. This implementation, I've been told by one of the BEA engineering
that worked
on it, has been certified to be JAX-RPC compliant by Sun. Don't know
about Apache
Axis, in this regard. I use both Apache Axis and the JWSDP with WLS 6.1,
but I
haven't really spent a lot of time looking for differences between our
(BEA's)
implementation, and theirs.
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Hey Mike ...
I hear ya..and I see the significance of WSIF...but that IBM started
it a year
back and itz not yet stabilized is what is holding me back...
U mite have a better hold of what WSIF can do...whatever I could grasp
from yesterday
is this...
a)It reads meta data from the wsdl and using a reflection mechanismcalls
the
service operations...
I see examples with primitive datatypes..but what happens when
complex/custom
datatypes come into play...
Would the client code differ between synchronous invocation toasynchronous
invocation...
And aleast in the samples for the WSIF distribution for connectors like
EJB/JMS
etc, the code does not look generic anymore..there are specific calls
to operations
and parameters...
Also Mike , what is the trade-off on performance between having adynamic
client(lets
say based on WSIF)or having a static client...the extent of reflection
a dynamic
client will have to do and create SAAJ objects at runtime will beenormous..
Also I know that there is a relevant API...but can u give an examleshowing
me
how I could discover services from UDDI ..?
Out of this current topic...does BEA use itz own implementation of SOAP
in itz
webservice implementation...and how does it compare with AXIS ?
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
Hi Krish,
Well, I guess that's how things are when "needed functionality exceeds
the current
state of a technology" :-)
I (not necessarily BEA) look at it like way:
1. IBM co-authored the "Big 3" XML grammars for the current web
services
stack.
2. IBM always appears to be "there, somewhere" in the new crop ofproposed
additional
XML grammars for "partially agreed upon extension layers", for theweb
services
stack.
3. IBM donated it's original SOAP implementation to the open-sourcecommunity.
4. IBM came up with WSIF over a year ago.
5. IBM's WSTK uses the Apache Axis stuff.
6. A lot of the JAX-RPC/JAXM API is based on the Apache SOAP and Apache
Axis implementations.
7. It looks like IBM may have donated WSIF to Axis.
8. You appear to need something like WSIF :-)
So, there's probably at least a 60/40 chance that some WSIF-like thing
will make
it into the JWSDP, right? If you want "higher odds", you should talk
to the folks
working on the JWSDP, as they are somewhat "in charge" here :-)
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Yes...I am surely lookin at something similar...but that framework
not
being standardized
scares me as I have seen many good ideas not seeing the light of the
day...and
I do not want to design something using a framework which might remain
un-standardized..
what are ur thots..
Thanx,
Krish
"Michael Wooten" <[email protected]> wrote:
Hi Krish,
It sounds like you want WSIF :-)
"WSIF allows stubless or completely dynamic invocation of a Web
service,
>>>>>>
based upon examination of the meta-data about the service at runtime.
It
also allows updated implementations of a binding to be plugged intoWSIF
at
runtime, and it allows the calling service to defer choosing a
binding
until
runtime."
Correct?
This is a relatively new "unofficial" addition to the Web ServicesStack,
so it
is not in WLS 7.0 (or Sun's JWSDP) yet. See the following link formore
details:
http://xml.apache.org/axis/wsif
Regards,
Mike Wooten
"Krish Venkataraman" <[email protected]> wrote:
Hey ,
I have an application which requires to talk to 2 different
published
webservices
from 2 different systems. Now instead od designing static webservice
clients for
each of these systems(which would involve having separate proxyjars
etc),
I am planning to design a dynamic webservice locator and invoker....
I know that we can have webservice clients which are dynamic tothe
extent
that
we can create proxy objects at runtime once we know the endpoint
WSDL..
eg:
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName =new QName
targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
>>>>>>>
QName portName = newQName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
>>>>>>>
QName operationName = newQName("urn:xmethods-delayed-quotes","getQuote");
>>>>>>>
URL wsdlLocation = newURL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
>>>>>>>
// create service
Service service = factory.createService(wsdlLocation, serviceName);
// create call Call call = service.createCall(portName,
operationName);
>>>>>>>
>>>>>>>
My question on this...if I have a dynamic approach like the abovewhat
are the
pros and cons..I guess it would surely have more overhead comparedto
a static
client...?
Secondly ,is it even feasible to design a dynamic client in such
a
way
that the
endpoint WSDL could also be an unknown and my generic client wouldalso
locate
the end-point dynamically and then invoke dynamic calls as above...
If anybody can share their insights on a dynamic webservice client
I would really
appreciate it...
Thanx,
Krish
KRISH.VENKATARAMAN
Senior Technology Analyst
Bank of America Corp.
Email:[email protected]
[BrowserClient.java]
[DynamicClient.java] -
Webservice: client proxy chokes on (any) reply
I have made sure that:
- there is a complete reproduction scenario
- the webservices are online!
- the wsdls and eclipse project with proxies and test program calling the proxies are attached
I can't find any references (SDN/google, posted on SDN) which help me with the errors my proxies (generated in Netweaver Developer Studio) keep getting when reading/processing the response message. Therefore I would be grateful for any pointer which helps me solve/workaround this problem.
PROBLEM:
Netweaver Developer Studio generated proxies choke when reading/processing our reply:
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.getResponseDocument(MimeHttpBinding.java:1077)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1432)
at com.quintiq.WSNullPointerExceptionProblem.Foo.FooBindingStub.foo(FooBindingStub.java:87)
FACTS & MY ANALYSIS
- We are using our own SOAP implementation, just so you know
- I tried all kinds of webservice signatures (void foo(void), string foo(string) etc...) All give the same problem
- Error messages work fine! (Our errormessage is read and perfectly converted into an exception)
- I ran several checkers/validators:
- EP Web Services Checker has no problem
- WS-I check reveals that the only problem is that we don't use UTF-8, but iso-8859-1 (I tried using UTF-8 which should be ok, same problem)
- Mindreef SoapScope gives no problem
- Several web based WSDL validators (also invoking the service) have no problem
- I use stateless communication (checkbox in LogicalPort configuration)
- I am using the sneak preview available for evaluation on SDN: " Sneak Preview SAP NetWeaver 04 - Full Java Edition with SAP NetWeaver Portal, NW04 SP16 11 Apr 2006"
- I get a warning (using guidgenerator.jar removes the warning, but does not help with the real problem)
Warning ! Protocol Implementation [com.sap.engine.services.webservices.jaxrpc.wsdl2java.features.builtin.MessageIdProtocol] could not be loaded (NoClassDefFoundError) !
Error Message is :com/sap/guid/GUIDGeneratorFactory
REPRODUCTION
Using the workspace attached:
To call webservice Foo: run with the main supplied in class com.quintiq.WSNullPointerExceptionProblem.Foo.Test_Foo
To call webservice PCT_DUEDATE: run with the main supplied in class com.quintiq.WSNullPointerExceptionProblem.Test_PCT_DUEDATE
To call both: run with the main supplied in class Main in the default package
It takes about 5/10 minutes to generate proxies yourself and call the webservice. (Don't forget to check the "stateless communication" checkbox in the LogicalPort configuration!)
The error is always the same:
java.rmi.RemoteException: Service call exception; nested exception is:
java.lang.NullPointerException
at com.quintiq.WSNullPointerExceptionProblem.Foo.FooBindingStub.foo(FooBindingStub.java:99)
at com.quintiq.WSNullPointerExceptionProblem.Foo.Test_Foo.main(Test_Foo.java:26)
at Main.main(Main.java:20)
Caused by: java.lang.NullPointerException
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.getResponseDocument(MimeHttpBinding.java:1077)
at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1432)
at com.quintiq.WSNullPointerExceptionProblem.Foo.FooBindingStub.foo(FooBindingStub.java:87)
... 2 more
Kind regards,
PatrickFound the problem. We returned HTTP code 202 (Accepted) instead of 200 (OK) when the response was in the body.
Patrick -
Problem in JAXRPC Webservice - Urgent
This is Santhakumar.
I have developed and deployed a JAXRPC webservice in Tomcat5.0 with JWSDP1.5.
WSDL is created and it works fine for normal java remote methods.
But when I write a code for to connect a live server ( EPP-Extensible Provisioning Protocol TCP server ), I could not invoke the service.
I get the following error:
================================================================
C:\examples\jaxrpc\dynamicproxy>ant run
Buildfile: build.xml
run-client:
[java] UrlString = http://localhost:8080/domain-jaxrpc/domain?WSDL
[java] java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingS
ender.java:497)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:294)
[java] at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvok
erImpl.java:79)
[java] at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:48
2)
[java] at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallI
nvocationHandler.java:121)
[java] at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallI
nvocationHandler.java:85)
[java] at $Proxy0.domainCheck(Unknown Source)
[java] at dynamicproxy.DomainClient.main(Unknown Source)
run:
BUILD SUCCESSFUL
Total time: 3 seconds
C:\examples\jaxrpc\dynamicproxy>
===========================================================================
I tried in many ways to resolve it.But still I could not find out any solutions.
Is there any security settings to be handled for that?
The method works fine and the server is connected when I execute it from the normal java class in command prompt.
But when implementing that method in JAXRPC webservice only I found this problem.
Please share your ideas with me to resolve this problem.I am at urgent.
Thanks in advance.
Santhakumar.
The sample example site used is:
http://www.cis.umassd.edu/~hxu/Projects/UMD/WebServices/Please check the OSS note - 1041204 - Controlling COMMIT WORK in production order BAPIs
Hope this helps you. -
Https transport support for JAX-WS WebServices
Hi All ,
I am trying to implement JAX-WS WebServices that support https transport .To do so I added the following annotation *@Policy(uri = "policy:Wssp1.2-2007-Https-BasicAuth.xml)* in my Jws Implementation file for the JAX-WS WebServices but I got parsing error.Can anyone please confirm that JAX-WS supports the policy annotation in Impl file.If it is supported can a link/pointer/example could be given to implement https enabled JAX-WS WebService and the required configuration in wsdl file.
Thanks and RegardsIt does but you've specified a policy that uses both HTTPS and basic HTTP authentication. If you require just HTTPS use "Wssp1.2-Https.xml". In turn you must enable the SSL port on the WLS server. See this blog post: http://one-size-doesnt-fit-all.blogspot.com/2009/02/enabling-ssl-and-disabling-non-ssl_17.html
If you use JDev to generate the JAX-WS web services, given the policy annotation JDev willl put the policy in the WSDL file appropriately.
CM. -
Policy Annotation in WebServices Impl file for JAX-WS WebServices
Hi All ,
I am trying to implement JAX-WS WebServices that support https transport .To do so I added the following annotation *@Policy(uri = "policy:Wssp1.2-2007-Https-BasicAuth.xml)* in my Jws Implementation file for the JAX-WS WebServices but I got parsing error.Can anyone please confirm that JAX-WS supports the policy annotation in Impl file.If it is supported can a link/pointer/example could be given to implement https enabled JAX-WS WebService and the required configuration in wsdl file.
Thanks and RegardsFor 11g, install the examples with a custom installation (have to specify that check mark that is not checked by default).
The look here:
<MIDDLEWARE_HOME>\wlserver_10.3\samples\server\examples\src\examples\webservices\wss1.1
Maybe you are looking for
-
F keys stop working, can't quit, restart, control-option-escape doesn't wor
Weirdness. I tried to lower the volume on iTunes and the F key didn't work. Then I tried to change the brightness. Nothing. I then tried to restart using the menu choice under the Apple. Nada. Tried to quit using the menu, nothing. Tried control-opti
-
How to share library on same mac with two users
please provide step by step instruction on how to share library for my two girls on the same computer. my older daughter already has itouch and library. Now for the holidays got younger one an itouch also and want to share the library. i am a novice
-
Flash: Video-- Flvplayback--using SWF file in dreamweaver.
I have placed a video into flash cs3 and made the swf file using the flvplayback, and i have put the swf or published it ...putting it in dreamweaver, I can see the video and hear the sounds when I preview in firefox or iexplore however once I put in
-
Standard Reports on Material Characteristics
Are there any standard reports where I can analyse stock balance and sales by material characteristics? Thanks. Justin
-
Change icloud account from my husbands to mine
my husband and i sync to the same computer. somehow his icloud account is set up on my phone, i want to change it to mine. can anyone assist?