Thomas Green

Greenhorn
+ Follow
since Aug 08, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Thomas Green

Thank you Dan.

I have not used a complex type here. Argument as well as the return type are String. I tried axis2 client as well as jaxrpc client to access the web service. Used the latest version of soap jar. Also the service provides both rest as well as normal url's to access the service. I tried both url's and failed

Thank you once again.
15 years ago
Could any one kindly help me to get out of this issue?
15 years ago
I'm getting the below exception while accessing a restful web service

[SOAPException: faultCode=SOAP-ENV:Client; msg=No Serializer found to serialize a 'org.apache.soap.rpc.Parameter' using encoding style 'http://schemas.xmlsoap.org/soap/envelope/'.; targetException=java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.apache.soap.rpc.Parameter' using encoding style 'http://schemas.xmlsoap.org/soap/envelope/'.]

This is the public URL of wsdl and client program

http://68.87.86.50/oss/services/ScoutPACKETCABLEResetService?wsdl
------------------------------------------------------------------------------
import java.net.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
import org.apache.soap.transport.http.*;

public class WSClient {

public static void main (String[] args) {

String strInput = "<?xml version=\"1.0\" ?><request><query app_key=\"GS_TEST\">";
strInput+="<device-list><device device_type=\"mac\">00:0e:5c:e7:a0:08</device>";
strInput+="</device-list></query></request>";

try {
URL url = new URL ("http://68.87.86.50/oss/rest/ScoutPACKETCABLEResetService");
Call call = new Call();
call.setTargetObjectURI("urn:resetPACKETCABLEDevice");
call.setMethodName("resetPACKETCABLEDevice");

call.setEncodingStyleURI(org.apache.soap.Constants.NS_URI_SOAP_ENV);
Vector params = new Vector ( );
params.addElement(new Parameter("parameter", String.class, strInput, null));
call.setParams (params);
call.setSOAPTransport(new SOAPHTTPConnection()) ;

Response resp = call.invoke(url, "");
if (resp.generatedFault( )) {
Fault fault = resp.getFault ( );
System.out.println ("\nOuch, the call failed: ");
System.out.println (" Fault Code = " + fault.getFaultCode ( ));
System.out.println (" Fault String = " + fault.getFaultString());
} else {
Parameter result = resp.getReturnValue ( );
System.out.print(result.getValue ( ));
}
}catch(Exception e) {
System.out.println(e);
}
}
}
15 years ago