SOAP Message Handler

I have a stand-alone java client which invokes a WSE enabled .NET web service. A custom policy file (no encryption or certificate. Just username token) is associated with the java client. I also include a SOAP handler to display the SOAP request. When I ran the client,
the display of the SOAP request message was quite different between the console and the .NET server trace file. The statement "messageContext.getMessage().toString());" just display "weblogic.xml.saaj.SOAPMessageImpl@502e15"
Could some one please tell me why the SOAP handler did not display the rest of the SOAP message like the .NET server trace file (shown below)?
Here is a snippet of my SOAP Handler handleRequest implementation:
public boolean handleRequest(MessageContext context) {
System.out.println("handle request...");
SOAPMessageContext messageContext = (SOAPMessageContext) context;
System.out.println("** Request: " + messageContext.getMessage().toString());
SOAPHeader sh = null;
try {
sh = messageContext.getMessage().getSOAPHeader();
} catch (SOAPException se) {
Iterator it = sh.examineAllHeaderElements();
while (it.hasNext()) {
System.out.println("*** There are SOAP Headers.....");
SOAPHeaderElement elem = (SOAPHeaderElement)it.next();
System.out.println("header ==> " + elem.getElementName().getQualifiedName());
return true;
Here is the display on the console:
run:
[java] in class digimarc.foto.webservice.clientstub.ClientHandler init()
[java] in class digimarc.foto.webservice.clientstub.ClientHandler init()
[java] in class digimarc.foto.webservice.clientstub.ClientHandler init()
[java] handle request...
[java] ** Request: weblogic.xml.saaj.SOAPMessageImpl@502e15
[java] *** There are SOAP Headers.....
[java] header ==> wsse:Security
[java] <11-Apr-2008 2:14:04 o'clock PM ADT> <Info> <WebService-LogHandler> <BEA-000000> <weblogic.xml.saaj.SOAPMessageImpl@502e15>
[java] ** Fault: weblogic.xml.saaj.SOAPMessageImpl@57b10b
[java] <11-Apr-2008 2:14:06 o'clock PM ADT> <Info> <WebService-LogHandler> <BEA-000000> <weblogic.xml.saaj.SOAPMessageImpl@57b10b>
[java] fetchMostRecent() Failed...
.NET web server trace:
<inputMessage utc="3/28/2008 3:05:43 PM" messageId="urn:uuid:23052686-df58-4144-9ec9-52617e5b5cd6">
<processingStep description="Unprocessed message">
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" env:mustUnderstand="1">
<wsse:UsernameToken wsu:Id="unt_R4qflJg2MR0no0AY" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>nbddls\john</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">G0ggin!</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</env:Header>
<env:Body>
<m:ImagingFolioFetchMostRecent xmlns:m="urn:digimarc.com:ImageServer:WebServices">
<m:personID>1001917</m:personID>
</m:ImagingFolioFetchMostRecent>
</env:Body>
</env:Envelope>
</processingStep>
</inputMessage>

But when i am calling the sevrice the client side
handler is not creating the soap envlope it is
showing it as null.
Follwing are the errors on Sun ONE console.The stack trace appears to be coming from the server side, not the client side. Then you get another error on the client side when the first error comes back. Without the line numbers in the file, I can't be positive, but it looks like the NPE is coming from the it.next() call below in your server handler:
Iterator it=header.getChildElements(name);
SOAPHeaderElement she= (SOAPHeaderElement)it.next();
It would be good to see the message on the wire to be sure, but this prolly means you have no header elements. Maybe the setMessage call on the client side handler isn't working -- are you sure that the client handler is being invoked? I don't see the "***Client***" message anywhere in the output.
If so, you could always try getting the existing soap message from the context and add headers to instead of creating a new message. The new message won't have the contents that you want to send to the service, so it looks like the call would fail even if the handler finishes correctly.
Cheers,
Bobby

Similar Messages

  • Web service client needs to share data with a SOAP Message Handler

    I have a web service client that is built using WebLogic 10 clientgen. I also have a Soap Message Handler configured that will create the required Soap Headers for the web service call.
    Creating these Soap Headers works great as long as the header data is static but the problem comes up when I need to place some dynamic data in these headers. The web service client has this data and somehow needs to pass it to the Soap Message Handler. It looks like I need to somehow have the client place this data in the MessageContext before the call so the data can be accessed by the Soap Message Handler.
    How do I get access to the MessageContext from the client or is there a better way to do this?
    Thanks in advance for any help you can give.

    You may want to check the response to this previous post to see if it yields any ideas for you:
    Not able to Pass header info to Microsoft MapPoint WebService using WLS10

  • Web-services.xml for EJB component and SOAP Message Handler Chain

    I have used the following example for my own web service with EJB component and SOAP
    Message Handler Chain:
    http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
    I have a deployment error:
    javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/DocumentService.j
    ar#DocumentService/home' Resolved: 'app/ejb' Unresolved:'DocumentService.jar#Doc
    umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
    In attachement is the ear file.
    Is there a problem in web-services.xml?
    Thanks
    [ws_dox_sdi.ear]

    It works. Thanks,
    Ioana
    "Neal Yin" <[email protected]> wrote:
    The error means your EJB is not deployed.
    Adding a EJB module to your application.xml file of the ear should fixe
    it.
    <application>
    <display-name />
    <module>
    <web>
    <web-uri>dox_sdi.war</web-uri>
    </web>
    </module>
    <module>
    <ejb>DocumentService.jar</ejb>
    </module>
    </application>
    "Ioana Meissner" <[email protected]> wrote in message
    news:3cf640cc$[email protected]..
    I have used the following example for my own web service with EJBcomponent and SOAP
    Message Handler Chain:
    http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
    I have a deployment error:
    javax.naming.NameNotFoundException: Unable to resolve'app/ejb/DocumentService.j
    ar#DocumentService/home' Resolved: 'app/ejb'Unresolved:'DocumentService.jar#Doc
    umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
    In attachement is the ear file.
    Is there a problem in web-services.xml?
    Thanks

  • How to access SOAP header without using SOAP message handler

    I have a requirement to retrieve SOAP header information within each web services operation. So I can't use SOAP message handler. Is there any way to do that? BTW, I am not using workshop.
    Thanks.

    Howeve how can I put data into soap header in UDF? DynamicConfiguration won't work for soap header, right?
    Which data do you want ot put into the Header section.
    ASMA or Dynamic Configuration is used to read/ put the details from/ into the header elements.....
    Refer: http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/frameset.htm
    From the help section:
    This information is not located in the payload of the message, but in additional message header fields.
    Regards,
    Abhishek.

  • SOAP APIs needed to extract SOAP request arguments for message handler implementation

    1. I am facing problem in using the Message Handler approach for the implementation
    of webservices using SOAP on BEA weblogic 8.1. A SOAP request(XML format) can
    be interrupted using the message handler and hence can be modified before it invokes
    the webservice method. I have been able to successfully extract the SOAP Name
    space xml format as a part of the SOAP request using the APIs given below
    APIs:
    SOAPBody body = env.getBody();
    Name Spaces format:
    <m:sayHello xmlns:m="http://www.bea.com/servers/wls70/samples/examples/webservices/basic/statelessSession">
    <intVal xsi:type="xsd:int">100</intVal>
    <string xsi:type="xsd:string">vikas</string>
    </m:sayHello>
    The above is a Hello world example which invokes the sayHello method with arguments
    as an integer and a string. I have not been able to find the SOAP APIs to extract
    these arguments from the SOAP Body.
    2. But there are XML apis which can extract the tag data from the SOAPBody e.g
    NodeList nl = body.getChildNodes();
    for(int i = 0; i < nl.getLength(); i++)
    Node node = (Node)nl.item(i);
    if(node instanceof SOAPElement){
    SOAPElement se = (SOAPElement)node;
    String operationName = se.getLocalName();
    String value = se.getValue();
    The SOAPBody interface implements the following interfaces (Ref : http://java.sun.com/j2ee/1.4/docs/api/index.html
    javax.xml.soap > SOAPBody )javax.xml.soap.Node, javax.xml.soap.SOAPElement(SOAP APIs)
    org.w3c.dom.Node, org.w3c.dom.Element (XML Parser APis)
    3. But webservice implementation of Weblogic Application server 8.1(webservice.jar)
    doesn't support the XML parser APIs and only supports the SOAP APIs.
    i.e. The SOAPBody Interface of Weblogic Application Server only implements the
    javax.xml.soap.Node, javax.xml.soap.SOAPElement (SOAP APIs) and not the XML APIs
    (org.w3c.dom.Node, org.w3c.dom.Element)
    So the code snippet written as a part of point 2 will not be compiled(give compilation
    error) using the webservice.jar of Weblogic 8.1.
    4. I have tried to compile the same code using the saaj-1_2-fr-api.jar (SOAP 1.2
    apis jar) which I have downloaded from java.sun site. And the code got successfully
    compiled.
    In this latest version of SOAP APIs jar the SOAPBody interface implements both
    the SOAP as well as XML parser Apis.
    5. I was not able to run this code on the Weblogic server , bcoz at the runtime
    weblogic 8.1 is using its webservice.jar instead of saaj-1_2-fr-api.jar. And
    this code was giving me runtime error as
    java.lang.NoSuchMethodError: javax.xml.soap.SOAPBody.getChildNodes()Lorg/w3c/dom/NodeList;
    (see Fault Detail for stacktrace)</faultstring>
    So now I need to find out the version of the webservice.jar of Weblogic 8.1 which
    supports SOAP Apis as well as XML parser apis.
    Otherwise I have to find out the SOAP apis which can extract the tag data from
    the SOAP body.
    Please Help.

    You can use the SAAJ APIs to get the child nodes.
    Example here:
    http://manojc.com/tutorial/sample4/ServerHandler.java
    so instead of using body.getChildNodes(), you have to use
    body.getChildElements() which returns an iterator of SOAPElements.
    Regards,
    -manoj
    http://manojc.com
    "Vikas Garg" <[email protected]> wrote in message
    news:40dfb5e0$1@mktnews1...
    >
    1. I am facing problem in using the Message Handler approach for theimplementation
    of webservices using SOAP on BEA weblogic 8.1. A SOAP request(XML format)can
    be interrupted using the message handler and hence can be modified beforeit invokes
    the webservice method. I have been able to successfully extract the SOAPName
    space xml format as a part of the SOAP request using the APIs given below
    APIs:
    SOAPBody body = env.getBody();
    Name Spaces format:
    <m:sayHelloxmlns:m="http://www.bea.com/servers/wls70/samples/examples/webservices/basic
    /statelessSession">
    <intVal xsi:type="xsd:int">100</intVal>
    <string xsi:type="xsd:string">vikas</string>
    </m:sayHello>
    The above is a Hello world example which invokes the sayHello method witharguments
    as an integer and a string. I have not been able to find the SOAP APIs toextract
    these arguments from the SOAP Body.
    2. But there are XML apis which can extract the tag data from the SOAPBodye.g
    >
    NodeList nl = body.getChildNodes();
    for(int i = 0; i < nl.getLength(); i++)
    Node node = (Node)nl.item(i);
    if(node instanceof SOAPElement){
    SOAPElement se = (SOAPElement)node;
    String operationName = se.getLocalName();
    String value = se.getValue();
    The SOAPBody interface implements the following interfaces (Ref :http://java.sun.com/j2ee/1.4/docs/api/index.html
    javax.xml.soap > SOAPBody )javax.xml.soap.Node, javax.xml.soap.SOAPElement(SOAP APIs)
    org.w3c.dom.Node, org.w3c.dom.Element (XML Parser APis)
    3. But webservice implementation of Weblogic Application server8.1(webservice.jar)
    doesn't support the XML parser APIs and only supports the SOAP APIs.
    i.e. The SOAPBody Interface of Weblogic Application Server only implementsthe
    javax.xml.soap.Node, javax.xml.soap.SOAPElement (SOAP APIs) and not theXML APIs
    (org.w3c.dom.Node, org.w3c.dom.Element)
    So the code snippet written as a part of point 2 will not be compiled(givecompilation
    error) using the webservice.jar of Weblogic 8.1.
    4. I have tried to compile the same code using the saaj-1_2-fr-api.jar(SOAP 1.2
    apis jar) which I have downloaded from java.sun site. And the code gotsuccessfully
    compiled.
    In this latest version of SOAP APIs jar the SOAPBody interface implementsboth
    the SOAP as well as XML parser Apis.
    5. I was not able to run this code on the Weblogic server , bcoz at theruntime
    weblogic 8.1 is using its webservice.jar instead of saaj-1_2-fr-api.jar.And
    this code was giving me runtime error as
    java.lang.NoSuchMethodError:javax.xml.soap.SOAPBody.getChildNodes()Lorg/w3c/dom/NodeList;
    (see Fault Detail for stacktrace)</faultstring>
    So now I need to find out the version of the webservice.jar of Weblogic8.1 which
    supports SOAP Apis as well as XML parser apis.
    Otherwise I have to find out the SOAP apis which can extract the tag datafrom
    the SOAP body.
    Please Help.

  • Problem to serialise the soap message in a handler

    I'm using a sun web service with a handler on the server side.
    In this handler I want to analize the soap message.
    First I try to serialize it :
    public boolean handleRequest(MessageContext arg0) {
        SOAPMessageContext context = SOAPMessageContext) arg0;
        SOAPMessage mes = context.getMessage();
        Document doc= mes.getSOAPPart();
        OutputFormat format = new OutputFormat(doc);
        format.setLineSeparator(LineSeparator.Windows);
        format.setIndenting(true);
        format.setLineWidth(0);            
        format.setPreserveSpace(true);
        StringWriter sw = new StringWriter();
        XMLSerializer serializer = new XMLSerializer(sw , format);
        serializer.asDOMSerializer();
        serializer.serialize(doc);             
        System.out.println(sw.toString());
    }The result I get looks like that :
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope><soapenv:Header>
    Where are the namespaces ?
    This xml is not correct because the soapenv prefix is not bound.
    How can I get a correct xml from the SOAP message ?

    Hi,
    Is ZYBTT a new attribute? Have you changed the status of the attribute to implemented or released (in SWO1: Edit -> Change release status)?
    And actually I think that your syntax is wrong too (BOR world is different compared to classes). If you want to use an attribute, I think that the syntax should be something like this:
    SWC_GET_PROPERTY <Object> <Attribute> <AttributeValue>.
    Read more here:
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/content.htm
    Regards,
    Karri

  • Using PI 7.0 to handle moving a PDF document into a SOAP Message & sending

    Here is our situation.  We have the business writing all invoices for a day out of SAP to disk formatted as a PDF document; meaning, if the file is FTP'd from the disk of SAP to an NT server inside our firewall it is recognised as a PDF by Windows and Adobe.
    After we read the PDF, I need to add it as the payload to a SOAP message that will be sent to the web service of a partner out side our firewall.  They will extract the PDF from the SOAP Message and print the invoices... stuff the envelopes ... and post them. 
    I have been trying to use the file adapter to "pick up" the PDF and the SOAP adapter to send... Obviously, it is not working and I need some assistance.  I am new to XI, so any advice will be greatly appreciated.
    Thanks,
    Rich

    1.If the partner webservice supports SOAP attachments then you can send the required attachments from FileAdapter by selecting "Additional Files" check box in the File Sender channel.
    Check this link: [http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm]
    2.Else if this not the case i.e., you want to send PDF file stream as part of payload then you need to convert the PDF file stream to BASE64 format then map to one of the field of Webservice structure and then post using SOAP Adapter.
    Remember the webservice field length should be enough to carry the BASE64 string otherwise the target application will fail to process the data or it will process data by truncating. Also there should be extra funtionality in target webservice for converting BASE64 format to binary format(PDF file).
    But in general the webservices will support attachements. So you can go ahead with Case1.
    Thanks,
    - Gujjeti.

  • Handling SOAP Message in JSP page

    Hi ALL,
    im using SOAP message to build MM7 message,
    i have a soap connection that create a connection to a servlet tp process request,
    the response is a soap message with attachment.....
    the SOAP is 1.1.
    SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
    SOAPConnection conn = connf.createConnection();
    SOAPMessage sMessage= conn.call (soapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
    sMessage.writeTo(output);
    when running the request for a java class it works fine, but when running same class from JSP page, i have error in SOAP response.....
    im using jdev1013, the application is working fine with another IDE but with Jdev 1013 i have exception
    --------------------Exception---------------------------
    06/10/29 12:33:24 javax.xml.soap.SOAPException: Unable to get header stream in saveChanges
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686)
    06/10/29 12:33:24 at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702)
    06/10/29 12:33:24 at com.eska.emmc.relay.vas.MM7Message.sendMessage(MM7Message.java:966)
    06/10/29 12:33:24 at com.eska.emmc.util.VASWrapper.retrieveNotifications(VASWrapper.java:383)
    06/10/29 12:33:24 at com.eska.emmc.subscriber.tags.ManageMessagesTag.doStartTag(ManageMessagesTag.java:67)
    06/10/29 12:33:24 at sub.mmessages._myMessages._jspService(_myMessages.java:70)
    06/10/29 12:33:24 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
    06/10/29 12:33:24 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
    06/10/29 12:33:24 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    06/10/29 12:33:24 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
    06/10/29 12:33:24 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    06/10/29 12:33:24 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
    06/10/29 12:33:24 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
    06/10/29 12:33:24 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    06/10/29 12:33:24 at java.lang.Thread.run(Thread.java:595)
    Message was edited by:
    samer khawaja

    Hello,
    The easiest way to call a Web Service is to use a Client Library instead of calling the SOAP call yourself.
    Can you for your project use a Web Service client stack (JAX-RPC, Axis, XFire, ...) this will create from the WSDL file a set of class and give you a very simple caller class that you can then integrate to your JSP.
    I am pointing you to the OracleAS Web Service Documentation section about Web Service proxy.
    And some simple how-tos that have specific tasks to create client:
    - Web Servics How Tos
    So you can see this specific ant target to create a WS proxy:
    <oracle:genProxy wsdl="[your URL to a WSDL]"
    output="${src.cli.dir}"
    packageName="bottomup.client.proxy"
    >
    <classpath>
    <pathelement path="${bld.cli.dir}"/>
    <pathelement location="${ORACLE_HOME}/webservices/lib/wsa.jar"/>
    </classpath>
    </oracle:genProxy>
    Regards
    Tugdual Grall

  • Writting attached file from SOAP message to a FTP folder

    Hi everybody,
    Our scenario is an interface which receives a SOAP message with a file attached. As we don't need to do any mapping into the attachment, we are supposed to deliver that file as it is into a FTP folder.
    Our problem is that we cannot find how to configure File comm channel to write the attached file and no the SOAP XML message which is what we are getting now. Any help on this?
    Thanks in advance.

    Hi
    check these forum posts
    SOAP with attachments
    Mail Sender Adapter - Attachment Handling
    Regards
    Vishnu

  • How to get full SOAP message in WebService

    hi,
    Is it possible to get SOAP message while Request operation during transaction in WebService.
    I tried with Handler, while retreiving message it is having a MessageContext. How to initilize that like example
    public boolean handleRequest(MessageContext mc) {
              SOAPMessageContext messageContext = (SOAPMessageContext) mc; 
              System.out.println("** Request: "+ messageContext.getMessage().toString());
              return true;
         }while i make a class called SoapHdlr i have implemented all methods including the above.
    In that from my class if i want to call the above method i need to pass MessageContext how to give that MessageContext or any other ways to get SOAPMessage fully.
    plz can any one guide me there
    ThanKQ

    I think, there are some concepts missunderstood. First if you use JAX-WS- Metro framework, this kind of handlers will work. Also you should identify your SOAPHandler for your web service. For ex: in Netbeans 6, you can right click on service and select configure handlers. Then you decide your handler.
    Then automatically, Metro framework directs SOAPMessages to your SOAPHandler to handle full SOAPs. HandleMessage() method will work.
    If you have problem again, just ask.

  • Trying to parse a Soap Message

    I'm working on creating webservices that will be consumed by
    Director and working with the client programmer, we've come to
    recognize the problem, but we don't know how to resolve it.
    Problem: the XMLParser doesn't follow href parameters in tags
    that refer to subobjects, which result in a #getProp Ref error.
    I have a web service method that will return a list of names
    and it returns the following XML response:
    &lt;?xml version=&quot;1.0&quot;
    encoding=&quot;UTF-8&quot; ?&gt;
    &lt;soapenv:Envelope xmlns:soapenv=&quot;
    http://schemas.xmlsoap.org/soap/envelope/&quot;
    xmlns:xsd=&quot;
    http://www.w3.org/2001/XMLSchema&quot;
    xmlns:xsi=&quot;
    http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
    &lt;soapenv:Body&gt;
    &lt;getStudentsResponse soapenv:encodingStyle=&quot;
    http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
    &lt;getStudentsReturn href=&quot;#id0&quot;
    /&gt;
    &lt;/getStudentsResponse&gt;
    &lt;multiRef id=&quot;id0&quot;
    soapenc:root=&quot;0&quot; soapenv:encodingStyle=&quot;
    http://schemas.xmlsoap.org/soap/encoding/&quot;
    soapenc:arrayType=&quot;xsd:anyType[6]&quot;
    xsi:type=&quot;soapenc:Array&quot; xmlns:soapenc=&quot;
    http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
    &lt;multiRef
    xsi:type=&quot;soapenc:string&quot;&gt;Bob B
    Bobbly&lt;/multiRef&gt;
    &lt;multiRef
    xsi:type=&quot;soapenc:string&quot;&gt;Andy A
    Anderson&lt;/multiRef&gt;
    &lt;multiRef
    xsi:type=&quot;soapenc:string&quot;&gt;Carl C
    Carlson&lt;/multiRef&gt;
    &lt;/multiRef&gt;
    &lt;/soapenv:Body&gt;
    &lt;/soapenv:Envelope&gt;
    When it hits the getStudentsReturn element and tries to refer
    to a child node, and obviously fails.
    The server is Tomcat 5.5, using Axis 1.4 for web services. I
    can post a wsdl if desired.
    The web service is configured for rpc/encoded style.
    What is the way to get out of this particular jam? Neither me
    nor the client programmer have extensive knowledge of how Director
    (or the relevant Xtra) handles SOAP messages or parse them. I've
    stepped through the code and seen the XML parser object render the
    response into an object tree, but it doesn't respect the href's.
    I can provide follow up to any questions or comments about
    this problem.
    Regards,
    Jeff Vandenberg

    Hi Jeff,
    While I don't have much experience with web services, I'm
    about to
    embark on something that involves extensive use of them, so
    your post
    caught my eye.
    If I understand correctly, the href attribute associated with
    the
    getStudentsReturn node is supposed to "automatically" link to
    the
    following multiRef array. Is that correct?
    Assuming it *did* link correctly, how would this manifest
    itself? Is it
    not a matter of you the parser watching for href tags and
    resolving them
    yourself? Why would you not simply provide the multiRef nodes
    as
    children of the getStudentsReturn node? Is there
    documentation somewhere
    for the href attribute and this form of linking?
    Have you tried using the Flash Asset xtra for parsing, and
    does it
    behave "correctly"?

  • External WebService call from CAF Core returns Invalid soap message

    I am trying to perform the very simple action of calling a WebService from a CAF Core app service.
      1. I imported the WS (Axis Web service running on NW 2004s SP9 server) with WSDL (option 2 on import external service page).
      2. I then assembled the call in an app service method and invoke it.
      3. I made sure to configure the end point for the service and the method using the External Service configuration.
    When I execute the CAF core method using a simple Callable Object test client, I get the following error:
    com.sap.caf.mp.base.exception.EngineException: Invalid soap message received
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.processComplexTypeMode(SOAPToMessageValueConverter.java:290)
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.generateComplexTypeValue(SOAPToMessageValueConverter.java:179)
         at
    truncated.
    I have also captured the XML request/reponse trace using tcpmon :
    REQUEST:
    POST /NWTestExpressWAR/services/TestExpressService HTTP/1.1
    Host: 192.168.99.120:8078
    Content-Type: text/xml; charset=UTF-8
    Content-Length: 348
    SOAPAction: http://www.testsys.com/TestExpressService/getAvailableModels
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:GetAvailableModels xmlns:ns1="http://www.testsys.com/TestExpressService"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: SAP J2EE Engine/7.00
    Set-Cookie: saplb_*=(J2EE11743000)11743050; Version=1; Path=/
    Content-Type: text/xml; charset=utf-8
    Date: Mon, 04 Dec 2006 02:19:39 GMT
    Transfer-Encoding: chunked
    Set-Cookie: JSESSIONID=(J2EE11743000)ID1261187150DB11296929644926762709End; Version=1; Domain=192.168.99.120; Path=/
    1f3
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetAvailableModelsResponse xmlns="http://www.testsys.com/TestExpressService"><modelNames><name>Great Oak Manufacturing-January03 Test</name><name>PriceCheck-default</name></modelNames><errorMessagesReturn/></GetAvailableModelsResponse></soapenv:Body></soapenv:Envelope>
    0
    The only problem I can think off is that the transfer-encoding is marked as chunked which is causing the characters '1f3' and '0' to appear after and before the response and that this is causing the app to crash.
    192.168.99.120 is the server the hosts the WS. It is also a 2004s SP9 server. The client server that hosts the CAF core service is of the same configuration. 8078 is the port I redirect for tcpmon purposes.
    Could anyone shed some light on my problem?
    Thanks,
    Pratap.

    It looks like NW WS client cannot handle Transfer-encoding of chunked even though this is part of HTTP 1.1. What seems to be happening is that the NW WS client is creating a HTTP 1.1 request. The service (axis ws running on NW) seeing this is creating a HTTP 1.1 response w/ chunked encoding. However, the client cannot handle this encoding and barfs. The solution is to change the service to return a HTTP/1.0 response since NW cant handle HTTP 1.1.
    Pratap.

  • How to Call web service operation by creating plain SOAP message in client?

    Hi
    Thank you for reading my post.
    I have some questions about using web methods of a web service which i would be very gratfull if you could answer.
    I should implement a web service that should receive a file with some other parameters from client and another web service which should receive some parameters and return a file.
    I used a mechanism like the following one to handle the condition and it just works. But I have a problem, I need to create dynamic invocation and I must create soap message and send it to webservice (no IDE generated code)
    What i need is one or two tips or a sample that shows how we can send and receive files by web services.
    I want to know how we can create the SOAP message ourself and then send it to the web service endpoint and it call the web method and ....
    Imagine the following web method, How i can invoke it by creating soap message myself and sending it to end point.
    @WebMethod
    public String saveFile(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileContent") byte[] fileContent) {
    // TODO implement operation
    return "Something";
    Another question is :
    Does this mechanism that i used to transfer files is OK?
    Is it optimized or there are some other ways to do this job.
    I should say that i put one week on handlers to use soap attachments and i get no result.
    So, Please let me know if you know or have some sample that show me how to do the above job.
    Thanks.

    Hi
    From NW04s SP8 you can create webservice systems from within VC , and you will have the option of adding a user and password to authenticate. You can find it at Tools>>Define web service system. You will see a check box url requires user and password.
    If for some reason you can not do it in VC then you should create the system in the portal and fill out the usermapping screens.
    Jarrod Williams

  • Error while posting SOAP message

    I am trying to post a SOAP message but I keep getting this error. Can anybody help me on this. I tried using ALTOVA spy and SOAP Ui but the result is the same error.
         <SOAP:Body>
              <SOAP:Fault>
                   <faultcode>SOAP:Server</faultcode>
                   <faultstring>Server Error</faultstring>
                   <detail>
                        <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                             <context>XIAdapter</context>
                             <code>ADAPTER.JAVA_EXCEPTION</code>
                             <text><![CDATA[
    com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve binding for the given channelId: Binding:CID=null;
    *     at com.sap.aii.af.service.cpa.impl.lookup.AbstractLookupManager.getBindingByChannelId*(AbstractLookupManager.java:173)
         at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:431)
    Scenario is SOAP Sender and IDOC reciever.

    I tried reconfiguring also.
    When I test from Integration Engine in RWB using the test message it is sucsseful. Infact I can see the IDOC too.
    But when the basis guy tested with Adapter engine in RWB using the test tool, it gives the following error:
    Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=BusComp_Siebel1;TS=;AN=SI_Sales_Order_OB_Async;ANS=http://trm.com:o2b:SalesOrderCreate; in the current context [Unknown].
    Any idea where is the problem.
    When we tried the WSN step we are facing this error in the very first step.
    WSDL1.1, WSDL 2.0 definition element expected. Found [html: null] .
    Edited by: Chandra Gunapati on Oct 7, 2009 10:00 PM

  • How to get javax.xml.soap.SOAPMessage handler?

    Hello,
    I'm trying to evaluate WebLogic AS 10, especially evaluate it if it's possible to use our custom access control module build using JACC API inside it. The problem is, we're using SOAPMessage handler, but it seems WebLogic does not register any handler at all at least by default? That's at least what I see after example H:\bea\wlserver_10.0\samples\server\examples\src\examples\webservices\jaxws\java2wsdl\SimpleEjbImpl.java
    modification:
    public String sayHello(String s) throws SystemException {
    System.err.println("CALL sayHello: " + s);
    Object obj = null;
    try {
    System.err.println("registered handlers: " + PolicyContext.getHandlerKeys());
    obj = PolicyContext.getContext("javax.xml.soap.SOAPMessage");
    } catch (PolicyContextException ex) {
    ex.printStackTrace();
    if (obj != null) {
    SOAPMessage msg = (SOAPMessage)obj;
    System.err.println("SOAP msg: " + msg);
    else
    System.err.println("This is not SOAP message!");
    other method code is unchanged. Anyway, when I run this example I see in example server console that there are no registered handlers and in such situation following call to PolicyContext to obtain SOAPMessage handler fails with the IllegalArgumentException: unknown handler
    My question is, what I have to do in order to setup WebLogic to use standard handlers like SOAPMessage handler, EJBArguments handler etc.?
    Thanks!
    Karel

    Hello,
    it seems I've found the reason myself. At least WebLogic does not seems to support JACC by default and it needs to be switched on manually.
    Thanks,
    Karel

Maybe you are looking for

  • Error occured while downloading ios 7.1.1 on iphone 4

    error occured while downloading ios 7.1.1 on iphone 4

  • Is a dual monitor setup with 2graphic cards possible?

    HI. What i want to do is run Archlinux on my Desktop but i dont want to miss my second monitor. I could use both monitor on my nvidia graphiccard but i want to use the energy saving features too (wich dont work with 2monitor on one card) therefore my

  • Library corruption on initial iTunes Match upload?

    Has anyone else seen this behavior? I just subscribed to iTunes Match. It went through the whole parsing of the library and uploaded. But now the library is messed up - some movies were marked as music, music as movies, some song files appear to have

  • ITunes 9.2 won't play purchased TV Shows

    Life was great before I downloaded iTunes 9.2 I have quite a couple of TV shows and this is what happens: 1. Video doesn't play, iTunes freezes, iTunes is slow and I have to end the program using the task manager (Windows 7) 2. Okay, so I thought I h

  • How could I make dbcosole service ?

    I use oracle11gR2 on win2008R2. I created first database by DBCA and windows service OracleDBConsoleSID was made. I created second dabase by DBCA but failed to create windows service OracleDBConsoleSID2 service. How could I make OracleDBConsoleSID2 s