You need to sign in to do that
Don't have an account?

unable to call custom webservice class from java client
partnerConnection = Connector.newConnection(config); partnerConnection.login(USERNAME, PASSWORD); System.out.println("SessionId: " + config.getSessionId()); MyWebServiceBindingStub Stub = new WyndhamMyWebServiceBindingStub(); MyWebServiceServiceLocator objMyWebServiceLocator=new MyWebServiceServiceLocator(); Stub=(MyWebServiceBindingStub)new MyWebServiceServiceLocator().getMyWebService(); SessionHeader_element sh = new SessionHeader_element(); sh.setSessionId(config.getSessionId()); Stub.setHeader(objMyWebServiceLocator.getServiceName().getNamespaceURI(),"SessionHeader", sh); Stub.callAction();
the code for the my java client looks like this but when I am executing the code am always getting No serializer found for class com.sforce.soap.partner.SessionHeader_element in registry org.apache.axis.encoding.TypeMappingDelegate@96cf11
Can somebody help me out, where actually m doing wrong.
I believe you're using the the wrong SessionHeader. Don't use the one from the partner namespace. Use the one from your custom wsdl's namespace.
All Answers
Did you run wsdl2java on the wsdl from your custom webservice?
Yes i ran WSDL2JAVA for creating the classes
I believe you're using the the wrong SessionHeader. Don't use the one from the partner namespace. Use the one from your custom wsdl's namespace.
i fear that there is no session header in the custom webservice class
There definitely is.
Sorry but i couldnt find Session header in the class generated by the custom WSDL.
After using wsdl2java 5 major classes were generated.
1) CustomWebserviceBindingStub
2)CustomWebservicePortType
3)CustomWebservicePortTypeProxy
4)CustomWebserviceService
5)CustomWebserviceServiceLocator
Where i should be looking for the session header?
You're saying if you open your wsdl in a text editor and ctrl+f for "session", that nothing comes up?
Thanks for the help. There was problem with setting in eclipse Wsdl2Java. The setting "Generate code for all elements" has to be checked
Ah, glad you got it worked out.