How to parse a entire SOAP Message

It seems that there is no API in JAXM for parse a entire SOAP Message.
And how to set encoding of a SOAP Message?

I can use Apache SOAP for parsing before. There is a class named
Envelope that has a method unmarshall(Element). So I can parse
SOAP message as a common DOM, then change to SOAP Message
using unmarshall. But in JAXP/JAXM, there is no such a class to work.

Similar Messages

  • How to send a signed SOAP message with additional HTTP Header fields

    Our Partner's integration requirements are that we send them asynchronous SOAP messages, that are digitally signed, and whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping.  I believe we can use the HTTP adapter for adding new fields to the HTTP header, but don't believe it supports signing.  I believe that the SOAP adapter supports signing, but I'm not clear on how to use it to add fields to the HTTP header.  What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Thanks,
    Kurt

    >>>What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
    Use Java mapping for both.
    1) Signing the message
    You can digitally sign the soap message using many standard api like WSS4j? or  refer Java XML signature API which comes in Jdk1.6.
    Refer these links
    WSS4J  -  http://ws.apache.org/wss4j/axis.html
    Java XML signature : http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
    2) >>whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping
    Use Dynamic configuration API to set the additional header fields during message mapping.

  • How to get the entire MIME message from a  BodyPart?

    Hi there,
    I am new to javaMail and quite lost with its way of working.
    I have a tool that creates SMIME stuff that needs to be put into MIME envelopes. In the same time I have to manage parsing of simple MIME messages.
    My current problem is the following:
    I have a BodyPart and I am testing if it is SMIME or not (with checks on the ContentType). If it is, then I want to retrieve the entire MIME message (I mean, the the whole text stuff with the headers and the -possibly- encoded64 content) as a String or a byte[]. But I haven't found anything in BodyPart that returns such a thing (everything is about the content). There might be writeTo() but it gives need an output stream that if piped in a pipedinputstream results in a dead lock...
    Help please!!
    Lionel

    hai
    i think you can use the methods in the MimeMessage to get the headers of the message
    by using any one the following
    1) getAllHeaders() use the enumeartion concept and then get the values for the headers using the getHeader(enum.getNextElements())
    2) or use the specific methods such as
    getFrom()
    getAllRecepients()
    getContentType()
    3) getHeader(string headername)
    bye

  • How to get Payload of SOAP Message in Advance Adapter Engine

    HI All,
    I am wondering if anybody can tell me how to view the Payload of SOAP Sender and Receiver Message in Advance Adapter Engine?
    Does Anybody know how to check mapping payload in Advance Adapter Engine because in ABAP you can see the mapping payload under Request Message Mapping but when you use AAE you can't see the Request Message Mapping Payload.
    I have a SOAP to RFC Scenario in which I can't see the SOAP Sender and RFC Receiver Mapping Payload.
    When I am sending incorrect data to an RFC I am getting this error which is very strange and new to me.
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Unable to split a synchronous message
    Any comments would be much appreciated.
    Thanks,
    Iqbal

    HI All,
    I have managed to find Michal's Blog which is talking about getting the mapping payload but unfortunately I don't know how to create Adapter Module so I am wondering if somebody can please provide me EAR file so that I will request the Basis guys to deploy the code and hopefully this will solve my query.
    Michal's Blog
    As you all probably know while using local Advanced Adapter Engine (AAE) processing in SAP PI 7.1 the message is logged only once (during processing by sender adapter). This is great in terms of performance but what if we need to check the mapping output? Is there a way do do it somehow? It turns out that we don't have such an option in standard yet. Is there any alternative then?
    It turns out there is - a simplest adapter module there is...
    Local AAE works in such a way that from the sender adapter it executes the receiver adapter so in the outbound message to PI processing you can see the adapter info logs of the receiver adapter and this is what we can use. The idea is to add an adapter module to the receiver adapter which will put the content of the message into the audit log of PI message processing. We can do it by writing a few lines of code:
    PI/XI: target message logging with local AAE not possible ? not anymore...
    *Please upload the file in any free site or <REMOVED BY MODERATOR>
    <READ RULES OF ENGAGEMENT>
    Thanks,
    Edited by: Prateek Raj Srivastava on Jan 6, 2012 9:10 PM

  • Parsing and resetting Soap Message

    Hi,
    I am modifying the Web Services StatlessSession example where I am using an Handler
    and building a new SOAPMessage object. When I test the deployed service I get
    Invocation failed message with following error (I am including just few lines
    from error message):
    <!--RESPONSE.................-->
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    </env:Header>
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Exception during processing: Error at Line:1, token:[OPENTAGBEGIN]Undefined
    Symbol:getListResponse (see Fault Detail for stacktrace)</faultstring>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">
    </bea_fault:stacktrace>Error at Line:1, token:[OPENTAGBEGIN]Undefined Symbol:getListResponse
         at weblogic.xml.babel.baseparser.BaseParser.getNameSpace(BaseParser.java:644)
         at weblogic.xml.babel.baseparser.Element.setNameSpace(Element.java:109)
         at weblogic.xml.babel.baseparser.StartElement.parse(StartElement.java:92)
         at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:440)
    My ejb creates the SOAPMessage in following manners:
    public SOAPMessage getList() {
    SOAPMessage amsg = null;
    try {
    // create list message
    amsg = fac.createMessage();
    // Access the SOAPBody object
    SOAPPart part = amsg.getSOAPPart();
    SOAPEnvelope envelope = part.getEnvelope();
    SOAPBody body = envelope.getBody();
    // Create the appropriate elements and add them
    Name bodyName =
    envelope.createName(
    "listing",
    "getListResponse",
    "http://localhost:7001/webservice/TraderService");
    SOAPBodyElement list = body.addBodyElement(bodyName);
    // coffee
    Name stockN = envelope.createName("stock");
    SOAPElement stock = list.addChildElement(stockN);
    Name stockNm1 = envelope.createName("stock-name");
    SOAPElement stockName1 = stock.addChildElement(stockNm1);
    stockName1.addTextNode("IBM International");
    Name symbol1 = envelope.createName("symbol");
    SOAPElement symbolNm1 = stock.addChildElement(symbol1);
    symbolNm1.addTextNode("IBM");
    Name traded1 = envelope.createName("number-traded");
    SOAPElement tradeNum1 = stock.addChildElement(traded1);
    tradeNum1.addTextNode("10");
    Name price1 = envelope.createName("price");
    SOAPElement priceNum1 = stock.addChildElement(price1);
    priceNum1.addTextNode("10.15");
    Name stockNm2 = envelope.createName("stock-name");
    SOAPElement stockName2 = stock.addChildElement(stockNm2);
    stockName2.addTextNode("HP International");
    Name symbol2 = envelope.createName("symbol");
    SOAPElement symbolNm2 = stock.addChildElement(symbol2);
    symbolNm2.addTextNode("HPI");
    Name traded2 = envelope.createName("number-traded");
    SOAPElement tradeNum2 = stock.addChildElement(traded2);
    tradeNum2.addTextNode("20");
    Name price2 = envelope.createName("price");
    SOAPElement priceNum2 = stock.addChildElement(price2);
    priceNum2.addTextNode("20.20");
    Name stockNm3 = envelope.createName("stock-name");
    SOAPElement stockName3 = stock.addChildElement(stockNm3);
    stockName3.addTextNode("Cannon International");
    Name symbol3 = envelope.createName("symbol");
    SOAPElement symbolNm3 = stock.addChildElement(symbol3);
    symbolNm3.addTextNode("CI");
    Name traded3 = envelope.createName("number-traded");
    SOAPElement tradeNum3 = stock.addChildElement(traded3);
    tradeNum3.addTextNode("30");
    Name price3 = envelope.createName("price");
    SOAPElement priceNum3 = stock.addChildElement(price3);
    priceNum3.addTextNode("30.30");
    amsg.saveChanges();
    catch (Exception e) {
    e.printStackTrace();
    return amsg;
    Handler sets the SOAPMessage back to the message context in Handler's handleResponse
    method where arg0 is the MessageContext:
    SOAPMessage amsg = trader.getList();
    ((SOAPMessageContext)arg0).setMessage(amsg);
    Any help/pointer will be really great help. I am using WebLogic 8.1 SP1. I can
    post/send the build.xml if needed.
    Thanks,
    Murtaza

    Hello,
    You might try adding the namespace declaration separately after creating
    the element name, something like this:
    listing.addNamespaceDeclaration("ns1",
    "http://localhost:7001/webservice/TraderService");
    This is just a guess; we really need to see the rest of the code.
    Hope this helps,
    Bruce
    Murtaza wrote:
    >
    Hi,
    I am modifying the Web Services StatlessSession example where I am using an Handler
    and building a new SOAPMessage object. When I test the deployed service I get
    Invocation failed message with following error (I am including just few lines
    from error message):
    <!--RESPONSE.................-->
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    </env:Header>
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Exception during processing: Error at Line:1, token:[OPENTAGBEGIN]Undefined
    Symbol:getListResponse (see Fault Detail for stacktrace)</faultstring>
    <detail>
    <bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">
    </bea_fault:stacktrace>Error at Line:1, token:[OPENTAGBEGIN]Undefined Symbol:getListResponse
    at weblogic.xml.babel.baseparser.BaseParser.getNameSpace(BaseParser.java:644)
    at weblogic.xml.babel.baseparser.Element.setNameSpace(Element.java:109)
    at weblogic.xml.babel.baseparser.StartElement.parse(StartElement.java:92)
    at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:440)
    My ejb creates the SOAPMessage in following manners:
    public SOAPMessage getList() {
    SOAPMessage amsg = null;
    try {
    // create list message
    amsg = fac.createMessage();
    // Access the SOAPBody object
    SOAPPart part = amsg.getSOAPPart();
    SOAPEnvelope envelope = part.getEnvelope();
    SOAPBody body = envelope.getBody();
    // Create the appropriate elements and add them
    Name bodyName =
    envelope.createName(
    "listing",
    "getListResponse",
    "http://localhost:7001/webservice/TraderService");
    SOAPBodyElement list = body.addBodyElement(bodyName);
    // coffee
    Name stockN = envelope.createName("stock");
    SOAPElement stock = list.addChildElement(stockN);
    Name stockNm1 = envelope.createName("stock-name");
    SOAPElement stockName1 = stock.addChildElement(stockNm1);
    stockName1.addTextNode("IBM International");
    Name symbol1 = envelope.createName("symbol");
    SOAPElement symbolNm1 = stock.addChildElement(symbol1);
    symbolNm1.addTextNode("IBM");
    Name traded1 = envelope.createName("number-traded");
    SOAPElement tradeNum1 = stock.addChildElement(traded1);
    tradeNum1.addTextNode("10");
    Name price1 = envelope.createName("price");
    SOAPElement priceNum1 = stock.addChildElement(price1);
    priceNum1.addTextNode("10.15");
    Name stockNm2 = envelope.createName("stock-name");
    SOAPElement stockName2 = stock.addChildElement(stockNm2);
    stockName2.addTextNode("HP International");
    Name symbol2 = envelope.createName("symbol");
    SOAPElement symbolNm2 = stock.addChildElement(symbol2);
    symbolNm2.addTextNode("HPI");
    Name traded2 = envelope.createName("number-traded");
    SOAPElement tradeNum2 = stock.addChildElement(traded2);
    tradeNum2.addTextNode("20");
    Name price2 = envelope.createName("price");
    SOAPElement priceNum2 = stock.addChildElement(price2);
    priceNum2.addTextNode("20.20");
    Name stockNm3 = envelope.createName("stock-name");
    SOAPElement stockName3 = stock.addChildElement(stockNm3);
    stockName3.addTextNode("Cannon International");
    Name symbol3 = envelope.createName("symbol");
    SOAPElement symbolNm3 = stock.addChildElement(symbol3);
    symbolNm3.addTextNode("CI");
    Name traded3 = envelope.createName("number-traded");
    SOAPElement tradeNum3 = stock.addChildElement(traded3);
    tradeNum3.addTextNode("30");
    Name price3 = envelope.createName("price");
    SOAPElement priceNum3 = stock.addChildElement(price3);
    priceNum3.addTextNode("30.30");
    amsg.saveChanges();
    catch (Exception e) {
    e.printStackTrace();
    return amsg;
    Handler sets the SOAPMessage back to the message context in Handler's handleResponse
    method where arg0 is the MessageContext:
    SOAPMessage amsg = trader.getList();
    ((SOAPMessageContext)arg0).setMessage(amsg);
    Any help/pointer will be really great help. I am using WebLogic 8.1 SP1. I can
    post/send the build.xml if needed.
    Thanks,
    Murtaza

  • 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

  • ADF Web Services 11g - how to change SOAP message

    Hey,
    Can I affect on SOAP structure?
    When we call web service, next soap message is generated:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl"; xmlns:ns1="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/"; xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header/>
    <env:Body>
    <ns:unos>
    <ppol>
    <ns1:kratkiopis/>
    <ns1:premijado/>
    <ns1:sifraklauzule/>
    <ns1:datumpocetka/>
    </ppol>
    <res_out>
    <ns1:kratkiopis ns2:nil="true"/>
    <ns1:premijado ns2:nil="true"/>
    <ns1:sifraklauzule ns2:nil="true"/>
    <ns1:datumpocetka ns2:nil="true"/>
    <ns1:vinkulacije ns2:nil="true"/>
    </res_out>
    </ns:unos>
    </env:Body>
    </env:Envelope>
    and we get next error:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>BEA-380001: Internal Server Error</faultstring>
    <detail>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380001</con:errorCode>
    <con:reason>Internal Server Error</con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    We send next SOAP message and then everything works fine (just removed ns1):
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl"; xmlns:ns1="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/"; xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header/>
    <env:Body>
    <ns:unos>
    <ppol>
    <kratkiopis/>
    <premijado/>
    <sifraklauzule/>
    <datumpocetka/>
    </ppol>
    <res_out>
    <kratkiopis ns2:nil="true"/>
    <premijado ns2:nil="true"/>
    <sifraklauzule ns2:nil="true"/>
    <datumpocetka ns2:nil="true"/>
    <vinkulacije ns2:nil="true"/>
    </res_out>
    </ns:unos>
    </env:Body>
    </env:Envelope>
    But I don't know how can we affect on SOAP message? I don't see any parameter or something what can I set to change SOAP message...
    Tnx.

    And when we call web service from proxy classes, then different SOAP message was sent , and that SOAP message is ok, too:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns3:unos xmlns:ns3="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl" xmlns:ns2="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/">
    <ppol>
    <ns2:kratkiopis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:premijado xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:sifraklauzule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:datumpocetka xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <res_out>
    <ns2:kratkiopis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:premijado xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:sifraklauzule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:datumpocetka xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    </res_out>
    </ns3:unos>
    </S:Body>
    </S:Envelope>

  • Find Soap Message Output Format

    Hi,
    I am trying to send message with receiver soap adapter to the client but the message i have in sxmb_moni is different than the one the client receives. I found this weblog that could help finding the message that is going out of the adapter : /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi but when i open the application enter values and click on add nothing happens.
    Have someone already done this or knows how to see the output soap message?
    Best regards,
    Laurent.

    Hi Laurent,
    Use Messaging System servlet..
    http://<host_XI>:<port>/MessagingSystem (case sensitive)
    Find your message, click Message Details (eye icon) , then Display Message Bytes
    Peter

  • Client intercept SOAP message

    We are developing a client application which accesses Web Services. I have been told to log all and every SOAP message it sends or receives.
    My client connects the Web Service through an static proxy we created using WSDL2Java(Axis). How could I get the SOAP messages (in the client side)?
    At this point we can't change the JAX-RPC client to pure SOAP nor the static proxy to a dynamic one (the application is almost finished and we are a bit short in time).
    We have been searching (google) and I have found this:
    http://e-docs.bea.com/wls/docs81/webserv/interceptors.html
    It says it is possible to do what I need by using a javax.xml.rpc.handler.Handler implementation class, but when I have tried to add the handler to the Web Service client it plainly ignores my handler.
    Does anybody know how to specify a handler to "intercept" the incoming server SOAP messages? (The server is a 3rd party (so we have no access at all to its source code)).
    This is my handler:
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.Handler;
    import javax.xml.rpc.handler.HandlerInfo;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    public class MyHandler implements Handler{
    private HandlerInfo handlerInfo;
    public MyHandler() {
         super();
    public boolean handleRequest(MessageContext arg0) {
         SOAPMessageContext messageContext = (SOAPMessageContext) arg0;
         System.out.println("** Request: "+messageContext.getMessage().toString());
         return true;
    public boolean handleResponse(MessageContext arg0) {
         SOAPMessageContext messageContext = (SOAPMessageContext) arg0;
         System.out.println("** Response: "+messageContext.getMessage().toString());
         return true;
    public boolean handleFault(MessageContext arg0) {
         SOAPMessageContext messageContext = (SOAPMessageContext) arg0;
         System.out.println("** Fault: "+messageContext.getMessage().toString());
         return true;
    public void init(HandlerInfo arg0) {
         this.handlerInfo = arg0;
    public void destroy() {
    public QName[] getHeaders() {
         return handlerInfo.getHeaders();
    I try to add it to the Web Service client by doing this:
    ServiceServiceLocator locator = new ServiceServiceLocator();
    try {
    Service port = locator.getws();
    // To obtain the SOAP messages
    QName portName = new QName( "http://endpoint_WS", "wsHello");
    HandlerRegistry registry = locator.getHandlerRegistry();
    List handlerList = new ArrayList();
    handlerList.add( new HandlerInfo( MyHandler.class, null, null ) );
    registry.setHandlerChain( portName, handlerList );
    port.sayHelloTo("Peter");
    Anybody knows where am I mistaken?
    I am trying to avoid modifying the generated client (static) proxy, the Web Service is still in development and it would mean I would have to edit it always they change the Web Service (leading to a lot of wasted work).

    I managed to intercept messages SOAP without proxy, but I do not obtain it with proxy (JAX-RPC or Axis)
    Any Suggest?
    Thank you.

  • 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"?

  • Parse SOAP messages

    Hi,
    I would like to know how efficient would be to use Oracle Text to parse SOAP messages. The body of the SOAP messages are heterogeneous in terms of format and size (smallest messages is about 20 lines, biggest message is about 200 lines). The number of records to parse is approximately one hundred thousand every hour.
    Thank you.

    In what sense do you want to "parse" them? Do you just want to find individual strings in the SOAP messages, or are you looking to fully interpret the meaning and content of the SOAP messages? If it's the second of these, then Oracle Text is not the right solution - you could perhaps look at Oracle XML Database instead.

  • How to intercept stream before SOAP parsing

    How can I intercept the stream before the SOAP message is constructed? I've attached a SOAPHandler, but even before I can output anything here
    public class TmpMessageHandler implements SOAPHandler<SOAPMessageContext> {
      public boolean handleMessage(SOAPMessageContext messageContext) {
        SOAPMessage msg = messageContext.getMessage();
        try {
          System.out.println("TMH.handleMessage, SOAP MSG: ");
          msg.writeTo(System.out);
        } catch (Exception x) {
          x.printStackTrace();
        return true;
    }an exception is thrown:
    SEVERE: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 31))
    at [row,col {unknown-source}]: [1,1]
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 31))
    at [row,col {unknown-source}]: [1,1]
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:292)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    Once printed out (after the exception), the SOAP message is well-formed:
    <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:Header/>
      <soapenv:Body>
        <TextRequest xmlns="http://j2ee.netbeans.org/GetTextService.xsd">
          <inputText>hello again</inputText>
        </TextRequest>
      </soapenv:Body>
    </soapenv:Envelope>So I assume there's a byte-order-mark (or other hidden character) which is not parsed properly but I'm unable to see the full stream.
    Help much appreciated,
    Lance

    Hello,
    From [1], Handlers on incoming messages are invoked before the message
    is delivered to the web service operation, and handlers on outgoing
    messages are invoked after the web service operation has completed. The
    web service itself is unaware of the presence of handlers. SOAP message
    handlers are sometimes referred to as interceptors. Also see [2][3].
    Did you include the code for the handler
    (handler.ConsoleLoggingHandler)? [4]
    Here's a simple handler example [5]
    Hope this is of some value,
    Bruce
    [1]
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/getstarted/conSOAPHandlers.html
    [2]
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/getstarted/conSOAPHandlers.html?skipReload=true#WhereHandlersFit
    [3]
    http://edocs.beasys.com/wls/docs81/webserv/interceptors.html#1060763
    [4]
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/getstarted/conSOAPHandlers.html?skipReload=true#HandlerExample
    [5]
    http://webservice.bea.com/log.zip
    Fatna wrote:
    >
    I'm using weblogic workshop 8.1 for creating web services. I need to intercept incoming SOAP messages in order to do some processing before executing the required function (especially i would like to be able to know which function is to be executed and if required, execute an athorer one, according to the processing result)
    I've tryed the tutorial given in the help, but i can't get it work. I'm using the example here after and i'm getting the following error: " the element '@jws:handler' is not allowed at this location".
    package Handler;
    * @jws:handler operation="handler.ConsoleLoggingHandler"
    public class HandlerExample1 implements com.bea.jws.WebService
    static final long serialVersionUID = 1L;
    /** @common:operation */
    public String echoString(String inputString)
    return inputString;
    I will apreciate if some one has a clue to resolve this problem.
    Thank you

  • Help, how to monitor the soap message sent by JAX-WS

    Hi,everyone:
    I want to monitor the soap message sent by JAX-WS using apache TCPMon.
    For example, the JAX-WS is deployed on port 8080 , I make TCPMon listening on port 4444 and send soap request to port 4444 using JAX-WS.
    Code in client:
    @WebServiceClient(name = "JAX_WS", targetNamespace = "http://www.example.org/JAX_WS/", wsdlLocation = "file:/E:/zwz/EclipseWorkspace/JAX_WSDemo/WebRoot/META-INF/JAX_WS.wsdl")
    public class JAXWS_Service extends Service {
         private final static URL JAXWS_WSDL_LOCATION;
         private final static Logger logger = Logger
                   .getLogger(demo.client.JAXWS_Service.class.getName());
         static {
              URL url = null;
              try {
                   //URL baseUrl;
                   //baseUrl = demo.client.JAXWS_Service.class.getResource(".");
                   url = new URL("http://localhost:4444/JAX_WSDemo/JAXWSBean");
              } catch (MalformedURLException e) {
                   logger
                             .warning("Failed to create URL for the wsdl Location: 'file:/E:/zwz/EclipseWorkspace/JAX_WSDemo/WebRoot/META-INF/JAX_WS.wsdl', retrying as a local file");
                   logger.warning(e.getMessage());
              JAXWS_WSDL_LOCATION = url;
         public JAXWS_Service(URL wsdlLocation, QName serviceName) {
              super(wsdlLocation, serviceName);
         public JAXWS_Service() {
              super(JAXWS_WSDL_LOCATION, new QName("http://www.example.org/JAX_WS/","JAXWSBeanService"));  //JAX_WS
         @WebEndpoint(name = "JAX_WSPort")
         public JAXWS getJAXWSSOAP() {
              return super.getPort(new QName("http://www.example.org/JAX_WS/","JAX_WSPort"), JAXWS.class);  //JAX_WSSOAP
    }But i get the exception:
    Exception in thread "main" com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException.
    java.net.SocketException: Unexpected end of file from server
    java.net.SocketException: Unexpected end of file from serverAnd the TCPMon doesn't receive anything.
    If i use Axis2, the TCPMon will work fine.
    I cannot figure out how to configure the webservices.
    Could anyone help me? Thanks a lot.

    [http://blog.vinodsingh.com/2007/02/monitor-soap-messages.html|http://blog.vinodsingh.com/2007/02/monitor-soap-messages.html]
    Edited by: vinod.singh on 7 Apr, 2009 11:03 AM

  • 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.

  • Would like to know how to read SOAP Messages from SOAP Client

    Hello,
    I am new to Webservices. Here is what I want to do.
    I need to develop a Web Service provider application.
    Here are the tools I am using to develop this application.
    a) WSAD 5.1.2
    b) Axis 1.0 built within WebSphere.
    I do have a WSDL file and I generated the code by using WSAD ==>WebService ==> Generate Java bean skeleton option. I want to know, how I can read the SOAP request message from the generated code and to add new SOAP header element.
    Any help you can provide would be greatly appreciated.

    Depending on the version of WebSphere you are using, there should be a menu option to create a dynamic web project. This will set up the basic structure of the application for you. Also, right-click on the newly created web application and there should be a context menu something like Web Services -> Deploy Web Service. This will do some more under-the-covers work for you.
    The webservices.xml deployment descriptor is only created when you generate your Java interfaces and helper classes. For example, if you are starting with a WSDL, you would right-click on the document, select Web Services -> Generate Java Bean Skeleton, and then follow the couple of dialog boxes afterwards. The webservices.xml document will then be created under the WEB-INF directory.
    I�d be wary of introducing any external web service software into a WebSphere environment. On my last project we ran into a few tricky SOAP API conflicts so we decided to stick with pure IBM implementations wherever possible. That said, this is some sample code that I've recycled from the Monson-Haefel book I've mentioned before:
    package sandbox;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.*;
    public class MessageHandlerID extends javax.xml.rpc.handler.GenericHandler{
      QName [] headerNames = null;
      public QName [] getHeaders(){
        if(headerNames == null){
          QName myHeader = new QName("http://speck.net.au/message-id", "message-id");
          headerNames = new QName[] { myHeader };
        return headerNames;
      public boolean handleRequest(MessageContext context){
        String messageID = new java.rmi.dgc.VMID().toString();
        try{
          SOAPMessageContext soapCntxt = (SOAPMessageContext)context;
          SOAPMessage message = soapCntxt.getMessage();
          SOAPHeader header = message.getSOAPPart().getEnvelope().getHeader();
          Name blockName = SOAPFactory.newInstance().createName("message-id","mi","http://speck.net.au/message-id");
          SOAPHeaderElement headerBlock = header.addHeaderElement(blockName);
          headerBlock.setActor("http://speck.net.au/message-id/logger");
          headerBlock.addTextNode( messageID );
          return true;
        } catch(javax.xml.soap.SOAPException se){
              throw new javax.xml.rpc.JAXRPCException(se);
    }It doesn't do much but might give you some ideas.
    You may have already come across this, but I found the following RedBook invaluable:
    Wahli, U., Garcia, G. O., Cocasse, S. and Muetschard, M. (2004). WebSphere Version 5.1 Application Developer 5.1.1 Web Services Handbook. IBM.

Maybe you are looking for

  • Purchase Order BAPI's

    Dear All, Could you please let me know the BAPI that can be used to check whether the Purchase order has been created for a particular material or not. Also to get the all the PO's that are created with the corresponding material details. Please the

  • Calculation error in net value

    Hi friends, I have a scenario where we have only one pricing procedure defined which includes basic price,excise,ecess,hsecess,packing charges, discounts etc. One i have a sales order which has got basic price,jexp,jecs,j1ax and i add PDIS(packing di

  • IPhoto quits as importing images !!!

    I have an iMac G5 (1024MB RAM) and OS X10.4.2 also iPhoto 5 (latest) As importing images, iPhoto quits without error, just creates an report for Apple. Need help!!! Any ideeas? My iPhoto library has about 41000 images....maybe to much for it? THX in

  • (ORA-997, ORA-1704) LONG TYPE 제약 사항 및 관련 에러 메시지

    제품 : SQL*PLUS 작성날짜 : 2003-03-14 (ORA-997, ORA-1704) LONG TYPE 제약 사항 및 관련 에러 메시지 ========================================================= PURPOSE 이 자료는 LONG type을 처리하는 과정에서 발생하는 문제와 이에 대한 해결방안에 대하여 소개한 자료이다. Problem Description LONG data type의 컬럼을 참조

  • If my wife has an Itunes account and I have another, can we combine them in our iphones?

    I know that we can share our buys at my macbook but, can we share them in our iphones too? and if so, how? Ty