• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.IllegalArgumentException: No Serializer found to serialize a 'com.sun.xml.messaging.saaj.s

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help me on this Please......
I am trying to use DOC-Literal Web service with WSIF tool .
Error as
------------
java.lang.IllegalArgumentException: No Serializer found to serialize a 'com.sun.xml.messaging.saaj.soap.impl.ElementImpl' using encoding style 'literal'.
----------------------------
--------------------------
Error Line
if (operation.executeRequestResponseOperation(input, output, fault))

Total Code
------------------
// get the service
WSIFService service = SOAPHelper.getWSIFService(SOAPHelper.TPAROLEAUTHORIZATION_SERVICE_NAME);
System.out.println("service="+service);
//Service service;//= SOAPHelper.getWSIFService(SOAPHelper.TPAROLEAUTHORIZATION_SERVICE_NAME);
//service.getPort(port, serviceEndpointInterface);
WSIFPort port = service.getPort();
System.out.println("port="+port);
WSIFOperation operation = port.createOperation("getUserTPAEntitlement");

// create the input, output and fault messages associated
// with this operation
WSIFMessage input = operation.createInputMessage();
WSIFMessage output = operation.createOutputMessage();
WSIFMessage fault = operation.createFaultMessage();

// input.setObjectPart("in0", inputBean);
SOAPFactory soapfactory = SOAPFactory.newInstance();
SOAPElement request = soapfactory.createElement("getUserTPAEntitlementElement", "ns0",
"http://localhost:8080/TPAHomeAuthorization/iws/ws/TPARoleAuthorizationService?wsdl";);
SOAPElement nameChild = soapfactory.createElement("in0");
nameChild.addTextNode("inputBean");
request.addChildElement(nameChild);
input.setObjectPart("parameters", request);
System.out.println("Sarmi4");
if (operation.executeRequestResponseOperation(input, output, fault))
{
System.out.println("Sarmi5");
// Get the output
//returnVo = (BaseNetworkBean) output.getObjectPart("getPlanAuthorityReturn");
//returnCo = (Collection) output.getObjectPart("getUserTPAEntitlementReturn");
Object[] objects = (Object[]) output.getObjectPart("getUserTPAEntitlementReturn");
if (objects != null && objects.length > 0)
{
// Put into an array list
for (int i = 0; i < objects.length; i++)
{
results.add(objects[i]);
}
}

}
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
First of all, having had a quick look at the WSIF web site, I notice that it seems like nothing has happened for more than 6 years.
This leads me to suspect that there will be problems using this tool to invoke a Document/Literal web service.
I see that you are trying to use parts from SAAJ (which, I also suspect, may cause problems when used with WSIF) - how about skipping the WSIF part and using only SAAJ to invoke the web service?
If you want an example on how to issue web service requests using SAAJ, take a look at page 199 in my document: http://faq.javaranch.com/content/Exam-Objectives-5.pdf
Best wishes!
 
reply
    Bookmark Topic Watch Topic
  • New Topic