1

Topic: soap client on wsdl on Spring

To begin with towards Google

2

Re: soap client on wsdl on Spring

In general, I by means of Eclipse generated Web Service Client Fed to it wsdl, it to me spat out classes.
It is correct? So it is possible?)
Or it is mandatory "manually"  wsdl, if yes, as is better and faster?

3

Re: soap client on wsdl on Spring

All correctly made. Use these classes if you precisely know with what service you work.

4

Re: soap client on wsdl on Spring

And how classes ? smile
class Mage_Api_Model_Server_HandlerBindingStub
interface Mage_Api_Model_Server_HandlerPortType
class Mage_Api_Model_Server_HandlerPortTypeProxy
interface MagentoService
class MagentoServiceLocator
I write:

public static void main (String [] args) throws UnsupportedOperationException, SOAPException, IOException, TransformerException {
Mage_Api_Model_Server_HandlerBindingStub client = new Mage_Api_Model_Server_HandlerBindingStub ();
String sessionId = client.login (name, password);
System.out.println (client.call (sessionId, "catalog_category.tree", null));
}

I receive:

11:48:51.116 [main] DEBUG o.a.axis.i18n. ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject (noEndpoint)
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/} Server. NoEndpoint
faultSubcode:
faultString: No endpoint
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/} exceptionName:org.apache.axis.NoEndPointException

here and here problems as at me.
Probably a class MagentoServiceLocator it is necessary , only as?:wacko
[mergetime] 1316509186 [/mergetime]
Understood:yes3

5

Re: soap client on wsdl on Spring

I of anything had not time to tell, a hammer)

6

Re: soap client on wsdl on Spring

Not the people. It is necessary to do on Springe.
I do on a manual
I receive:

Sep 20, 2011 7:03:39 AM PM com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl lookForEnvelope
SEVERE: SAAJ0514: Unable to create envelope from given source because the root element is not named Envelope
Sep 20, 2011 7:03:39 AM PM com.sun.xml.internal.messaging.saaj.soap.EnvelopeFactory createEnvelope
SEVERE: SAAJ0511: Unable to create envelope from given source
Exception in thread "main" org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: Unable to create envelope from given source:; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at org.springframework.ws.soap.saaj.SaajSoapMessage.getSaajVersion (SaajSoapMessage.java:260)
at org.springframework.ws.soap.saaj.SaajSoapMessage.getImplementation (SaajSoapMessage.java:342)
at org.springframework.ws.soap.saaj.SaajSoapMessage.<init> (SaajSoapMessage.java:117)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage (SaajSoapMessageFactory.java:184)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.createWebServiceMessage (SaajSoapMessageFactory.java:58)
at org.springframework.ws.transport.AbstractWebServiceConnection.receive (AbstractWebServiceConnection.java:90)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive (WebServiceTemplate.java:548)
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive (WebServiceTemplate.java:496)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive (WebServiceTemplate.java:451)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult (WebServiceTemplate.java:395)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult (WebServiceTemplate.java:386)
at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult (WebServiceTemplate.java:376)
at com.pmssoftware.prodigitalis.core.webservice.client.WebServiceClient.simpleSendAndReceive (WebServiceClient.java:36)
at com.pmssoftware.prodigitalis.core.common.ServiceRunner.main (ServiceRunner.java:19)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at com.sun.xml.internal.messaging.saaj.soap.EnvelopeFactory.createEnvelope (EnvelopeFactory.java:114)
at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource (SOAPPart1_1Impl.java:70)
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.getEnvelope (SOAPPartImpl.java:122)
at org.springframework.ws.soap.saaj.support.SaajUtils.getSaajVersion (SaajUtils.java:155)
at org.springframework.ws.soap.saaj.SaajSoapMessage.getSaajVersion (SaajSoapMessage.java:257)
... 13 more
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source because the root element is not named "Envelope"
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.lookForEnvelope (SOAPPartImpl.java:148)
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.getEnvelope (SOAPPartImpl.java:115)
at com.sun.xml.internal.messaging.saaj.soap.EnvelopeFactory.createEnvelope (EnvelopeFactory.java:104)
... 17 more

7

Re: soap client on wsdl on Spring

[QUOTE=Farmazon, 9/20/2011, 20:46, post2404566] version 1.5 manual...
Is a little  http://static.springsource.org/spring-w … lient.html [/QUOTE]
Here the same not a working example:smile

8

Re: soap client on wsdl on Spring

, the second days to Google, are not present any working example as it is possible on wsdl to work about a web as services:wacko
Though on what. Though , though cxf.
Can at you there is an example the worker?:sample