Hi,
Since you are making the call by hand (i.e not using generated code)
the issue could well be the missing SOAP action.
You can have a look at the messages passed by using tcpmon[1]. I also
suggest you to use something like SOAPUI[2] to generate a request and
compare them - which should tell you if there is anything wrong.

Ajith

[1] http://ws.apache.org/commons/tcpmon/
[2] http://www.soapui.org/


On 6/10/07, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:
Hi Michele ,
In the case of Axis2 you need to give the full epr to the service like ,
http://myhost:8080/axis2/services/Foo <http://myhost:8080/axis2/services/>

sometime you may have to give the soap action as well.

Thanks
Deepal
> Hello.
>
> I have Tomcat with both axis1 and axis2 installed.
>
> I woul dlike to invoke both axis1 and axis2 services using axis1
> client, e.g.:
>
>         try {
>             Call call = (Call) new org.apache.axis.client.Service
> ().createCall();
>             call.setTargetEndpointAddress(new URL(servicesURL));
>             call.setOperationName(new QName("Version", "getVersion"));
>             Object response = call.invoke (new Object[]{});
>             logMessage = "**** Version service said: " + (String)
> response;
>         }
>       ...........
>
> This code works fine when servicesURL == "
> http://myhost:8080/axis1/services/";,
> but does not work when servicesURL ==
> "http://myhost:8080/axis2/services/ <http://myhost:8080/axis2/services/>".
>
> In the latter case, the following RemoteException:
>
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
> <http://schemas.xmlsoap.org/soap/envelope/%7DClient>
>  faultSubcode:
>  faultString: Service not found operation terminated !!
>  faultActor:
>  faultNode:
>  faultDetail:
>     {http://xml.apache.org/axis/}stackTrace:Service
> <http://xml.apache.org/axis/%7DstackTrace:Service> not found operation
> terminated !!
>     at org.apache.axis.message
> .SOAPFaultBuilder.createFault (SOAPFaultBuilder.java:221)
>     at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
>     at
> 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
> Source)
>     at
> 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
> (Unknown Source)
>     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at javax.xml.parsers.SAXParser.parse(Unknown Source)
>     at
> 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>     at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>     at org.apache.axis.Message.getSOAPEnvelope(Message.java :424)
>     at
> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
>     at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>     at org.apache.axis.strategies.InvocationStrategy.visit
> (InvocationStrategy.java:32)
>     at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>     at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>     at org.apache.axis.client.AxisClient.invoke(AxisClient.java :165)
>     at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
>     at org.apache.axis.client.Call.invoke(Call.java:2748)
>     at org.apache.axis.client.Call.invoke(Call.java:2424)
>     at org.apache.axis.client.Call.invoke (Call.java:2347)
>     at org.apache.axis.client.Call.invoke(Call.java:1804)
>     at nc3a.ListServices.main(ListServices.java:72)
>
>     { http://xml.apache.org/axis/}hostname:Ardarico
> <http://xml.apache.org/axis/%7Dhostname:Ardarico>
>
> Service not found operation terminated !!
>     at
> 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
>     at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java
> :128)
>     at
> 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> Source)
>     at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement
> (Unknown Source)
>     at
> 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>     at javax.xml.parsers.SAXParser.parse(Unknown Source)
>     at
> 
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java
> :227)
>     at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>     at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
>     at
> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
> :796)
>     at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>     at
> 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>     at org.apache.axis.SimpleChain.doVisiting (SimpleChain.java:118)
>     at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>     at
> org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)error:
> service invocation failed
>
>     at org.apache.axis.client.Call.invokeEngine (Call.java:2765)
>     at org.apache.axis.client.Call.invoke(Call.java:2748)
>     at org.apache.axis.client.Call.invoke(Call.java:2424)
>     at org.apache.axis.client.Call.invoke(Call.java:2347)
>     at org.apache.axis.client.Call.invoke (Call.java:1804)
>     at nc3a.ListServices.main(ListServices.java:72)
>
>
> Why this?
>
>
>
> --
> Michele Amoretti, Ph.D.
> Distributed Systems Group
> Dipartimento di Ingegneria dell'Informazione
> Università degli Studi di Parma
> http://www.ce.unipr.it/amoretti


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Ajith Ranabahu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to