Create SOAP message

Hi,
I would like to know different ways
1. Create a SOAP message in CRM system.
2. Send this to other systems?
Please help.
Rokie

It seems that one of the providers was mis-configured (the first service called) :
HTTP Transport Configuration      
Follow HTTP redirects      DISABLED
Use Chunked Streaming Mode      ENABLED
when I enabled the HTTP redirect then the problem went away...
HTTP Transport Configuration      
Follow HTTP redirects      ENABLED
Use Chunked Streaming Mode      DISABLED

Similar Messages

  • OSB - Couldn't create SOAP message due to exception: Unable to create StAX

    Hi,
    If I call 2 webservices via OSB 10Rg3 in quick succession I get the following fault on the second response :
    <May 6, 2010 5:25:14 PM CEST> <Error> <ALSB Logging> <BEA-000000> < [null, null, null, ERROR] <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/e
    nvelope/"/><S:Body xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
    <faultcode>S:Client</faultcode>
    <faultstring>Couldn't create SOAP message due to exception: Unable to create StAX reader or writer</faultstring>
    </S:Fault>
    </S:Body><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>RouteToTestService</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>>
    Any ideas what could cause this? The provider web services are working fine... and there is no problem if there is a long time delay between calling the 2 web services.

    It seems that one of the providers was mis-configured (the first service called) :
    HTTP Transport Configuration      
    Follow HTTP redirects      DISABLED
    Use Chunked Streaming Mode      ENABLED
    when I enabled the HTTP redirect then the problem went away...
    HTTP Transport Configuration      
    Follow HTTP redirects      ENABLED
    Use Chunked Streaming Mode      DISABLED

  • Problem: Applets cannot Create SOAP Message Objects using JAX Pack

    Hi all
    I want to invoke a simple webservice located at a url.
    I wish to send a SOAP Message . The Message is creating using
    javax.xml.soap package
    Here is the code
    public void init(){
    try{
    MessageFactory MF = MessageFactory.newInstance();
    SOAPMessage message = MF.createMessage();
    SOAPPart SP = message.getSOAPPart();
    SOAPEnvelope SE = SP.getEnvelope();
    SOAPHeader SH = SE.getHeader();
    SOAPBody SB = SE.getBody();
    Name bodyName = SE.createName
    ("testString","L","http://tempuri.org/");
    SOAPBodyElement SBE = SB.addBodyElement(bodyName);
    }catch(Exception e){}
    When I run the applet in a browser I am getting ExceptionInInitializerError or NullPointer Exception.
    The same application works when i run as a standalone application. But not in APPLET.
    Can somebody help me in this regard

    Im trying to do the same thing !!, i have a servlet that processes SOAP messages, and return SOAP messages back.
    Like you i have a implementation running with a stand alone client instead of an applet, which runs fine (there are several .jar files that have to be included in the jre/lib/ext directory, in total about a meg!).
    Im now looking to incorporate this client into an applet, but it moans about cannot find classes (the JAXM and SOAP classes).
    Have you found a solution to this yet ?? Surely you cannot expect the user to download all the required jar files along with the applet??
    With regards to your problem try setting up a button that fires off the SOAP Msg and processes the response, i read on the Sun Java Applet tutorials that some code should stay out of the init method(its a bit vague about WHAT should stay out..), maybe this is an example.
    Thanks,
    (i dont really expect a response as you posted this ages ago !!, but it would be nice.)

  • Help needed on Creating SOAP message

    hi all
    i am trying to use the saaj from JWDP1.4 to manually create a soap message and send it to a .net webservice. when i run it, i keep getting error complaining the http header :
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html.here is the code, notice the part i use the message to add header information, but it didn't get added for some reason. any help would be much appreciated.
    import javax.xml.soap.SOAPConnectionFactory;
    import javax.xml.soap.SOAPConnection;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.soap.SOAPPart;
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPBody;
    import javax.xml.soap.SOAPElement;
    import java.io.FileInputStream;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamResult;
    import java.net.URL;
    public class JWTest {
       public static void main(String args[]) {
          try {
             //First create the connection
             SOAPConnectionFactory soapConnFactory =
                                SOAPConnectionFactory.newInstance();
             SOAPConnection connection =
                                 soapConnFactory.createConnection();
             //Next, create the actual message
             MessageFactory messageFactory = MessageFactory.newInstance();
             SOAPMessage message = messageFactory.createMessage();
              //  Add the HTTP headers.
              message.getMimeHeaders().addHeader("User-Agent", "Mozilla/4.0 [en] (WinNT; I)");
              message.getMimeHeaders().addHeader("Host", "m25385");
              message.getMimeHeaders().addHeader("Content-type", "text/xml");
              message.getMimeHeaders().addHeader("SOAPAction", "TELUS.Geomatics.WebServices.AdslAvailability.GetAdslAvailability/GetAvailability");
              message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");
             //Create objects for the message parts           
             SOAPPart soapPart =     message.getSOAPPart();
             SOAPEnvelope envelope = soapPart.getEnvelope();
              envelope.addNamespaceDeclaration("xsd", "http://www.w3.org/2001/XMLSchema");
              envelope.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
             SOAPBody body =         message.getSOAPBody();
            //Populate the body
            //Create the main element and namespace
            SOAPElement bodyElement =
                      body.addChildElement(envelope.createName("GetAvailability" ,
                                              "TELUS.Geomatics.WebServices.AdslAvailability.GetAdslAvailability"));
            //Add content
            bodyElement.addChildElement("postalCode").addTextNode("T6J2S4");
              bodyElement.addChildElement("phoneNumber").addTextNode("7057211380");
              bodyElement.addChildElement("callingSystem").addTextNode("MyTelus");
            //Save the message
            //message.saveChanges();
            //Check the input
            System.out.println("\nREQUEST:\n");
            message.writeTo(System.out);
            System.out.println();
            //Send the message and get a reply  
            /*Set the destination
            String destination =
                "http://m25385/GeoExplorer/webservices/ADSLAvailability/GetADSLAvailability.asmx";
              URL endpoint = new URL("http://m25385/GeoExplorer/webservices/ADSLAvailability/GetADSLAvailability.asmx");
            //Send the message
            SOAPMessage reply = connection.call(message, endpoint);
            //Check the output
            System.out.println("\nRESPONSE:\n");
            //Create the transformer
            TransformerFactory transformerFactory =
                               TransformerFactory.newInstance();
            Transformer transformer =
                            transformerFactory.newTransformer();
            //Extract the content of the reply
            Source sourceContent = reply.getSOAPPart().getContent();
            //Set the output for the transformation
            StreamResult result = new StreamResult(System.out);
            transformer.transform(sourceContent, result);
            System.out.println();
             //Close the connection           
             connection.close();
            } catch(Exception e) {
                System.out.println(e.getMessage());
    }

    Can this be done in actionPerformed method If you want the user to have to hit enter after every character they type, yes. Most auto-complete implementations don't, and they'll hate you for it.
    Can anyone be more specific What is your specific problem? have you already implemented your combo-box model that will prune the available selections, or not? If not, start there.
    Also if is enter S in textfield wont the focus in the
    Dropdown be on the first choice starting with S ?Not if the combo is editable and the drop down is not showing.
    is it possible with JComboBox or someother Swing componentYes. Follow the steps in the previous post.
    Pete

  • How to create soap message through java using JAXM

    Hi,
    I'M REALLY NEW TO THIS JAVA WEB SERVICES. I need to send a soap messages from core java with using url and it goes to my servlet and able to retrieve the soap message and do the processing. I really don't the work flow too. I'm using JAXM for receiving and transfering message. Could anyone tell me how its going to work for core java. Actually i need to accept any incoming soap messages and according to the request i got , i do need to do the further processing and again send back response to the core java. I'm not sure what i'm telling is wright or wrong. I literally confused with whole java web services . Could anyone help me out please or suggest some other suggestions through which i can proceed further.
    in advance thanks a lot.......

    File f = new File("c:\MyFolder");
    f.mkdir();

  • Not able to create SOAP message

    hi
    i am a newbie in CRM On Demand Integration Development.
    I am trying to enter a lead value hard coded.
    I am using JDeveloper (version 11.0) to create the proxy classes from WSDL
    but i am getting an exception as following
    SOAPFaultException
    this exception indicate that there is some problem in creation of SOAP massage internally
    so can anyone help me to know what is the problem?
    If u want to see the code then i can display here.
    thanks in advance

    Hi,
    You could use the Enterprise Portal Web Service Checker, which is delivered with SAP Dev Studio NW04, and available in Enterprise Portal perspective.
    Best Regards,
    Frederic

  • New to SOAP - How to create SOAP message for the SOAP described

    Hi Friends,
    Im bit new to SOAP-JAVA interactions.
    I have an SOAP describing
    POST /abc/WebSrevices/MyService.asmx HTTP/1.1
    Host: 127.0.0.1
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://tempuri.org/BillingAddressValidation"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <BillingAddressValidation xmlns="http://tempuri.org/">
    <inXml>string</inXml>
    </BillingAddressValidation>
    </soap:Body>
    </soap:Envelope>
    My question is How can I construct an equivalent JAVA message using SAAJ
    I wrote like the following
    public void performSOAPReadWrite(String transaction){
    try{
    SOAPConnectionFactory scf = SOAPConnectionFactory. newInstance();
    SOAPConnection con = scf.createConnection();
    MessageFactory mf =
    MessageFactory.newInstance();
    SOAPMessage msg = mf.createMessage();
    SOAPPart sp = msg.getSOAPPart();
    SOAPEnvelope envelope = sp.getEnvelope();
    //Adding Content to the Header
    envelope.getHeader().detachNode();
    SOAPBody body = envelope.getBody();
    SOAPElement billingAddressValidation =
    body.addChildElement("BillingAddressValidation","http://tempuri.org/");
    SOAPElement inXml =
    billingAddressValidation.addChildElement("inXml");
    inXml.addTextNode(transaction);
    URL urlEndpoint = new URL(DEFAULT_SERVER);
    // 127.0.0.1/abc/WebSrevices/MyService.asmx
    System.out.println("Sending Message");
    SOAPMessage reply = con.call(msg,
    urlEndpoint);
    System.out.println("Reply is "+reply);
    }catch (Exception e) {
    e.printStackTrace();
    // TODO: handle exception
    Can any one let me know whats wrong in this ?
    Thanx in advance
    Im waiting for ur reply
    Mahesh Raja Vandyala
    Senior Analyst

    Hi,
    When im running the program I am getting a
    javax.xml.soap.SOAPException: Failed to send message:java.io.IOException: The server at http://127.0.0.1/abc/WebSrevices/MyService.asmx returned a 500 error code ( Internal Server Error )
    Please ensure that ur URL is correct and the Web service has deployed
    This is web service is provided by .net team and im required to take the services of that web service to retrieve some information provided by that.
    I can launch the webservice definition thru IE....their they have provide a text box with a Invoke button.
    The same data that im sending thru code if invoked thru IE is working fine.
    I suspect that the way Im construcint the SOP message is wrong.
    Any help in finding out the correctness of the Message in the java code ?
    Thanx
    Mahesh

  • 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

  • OES error:Couldn't create SOAP msg:Unable to create stAX reader & writer

    Hi,
    I can see the below severe error in the nohup.out log file for OES.
    Environment:
    Unix Server 1: OES admin and SM
    Unix Server 2: SM with the same name
    Both the SM pointing to Server 1 admin server.
    I can see the below error only on server 2. There is no such error on server1.
    I donot understand while this error is coming up.
    Checked all web services through SOAPUI and all web services are responding properly as expected from Server2
    NOHUP.OUT
    com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit handle
    SEVERE: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: Unable to create StAX reader or writer
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:292)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:287)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:102)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:512)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:253)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:141)
    at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:172)
    at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
    at weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:311)
    at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:336)
    at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: com.sun.xml.ws.streaming.XMLReaderException: Unable to create StAX reader or writer
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$NoLock.doCreate(XMLStreamReaderFactory.java:430)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Woodstox.doCreate(XMLStreamReaderFactory.java:454)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.doCreate(XMLStreamReaderFactory.java:219)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderFactory.java:172)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:311)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:135)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ... 22 more
    Caused by: com.ctc.wstx.exc.WstxIOException: Connection reset
    at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:536)
    at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:585)
    at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:641)
    at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:344)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$NoLock.doCreate(XMLStreamReaderFactory.java:428)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Woodstox.doCreate(XMLStreamReaderFactory.java:454)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.doCreate(XMLStreamReaderFactory.java:219)
    at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.create(XMLStreamReaderFactory.java:172)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:311)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:136)
    ... 23 more
    Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at weblogic.utils.io.ChunkedInputStream.read(ChunkedInputStream.java:159)
    at java.io.InputStream.read(InputStream.java:85)
    at com.certicom.tls.record.ReadHandler.readFragment(Unknown Source)
    at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    at com.certicom.tls.record.ReadHandler.read(Unknown Source)
    at com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
    at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:177)
    at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:228)
    at weblogic.wsee.jaxws.HttpServletAdapter$RequestResponseWrapper$InputStreamWrapper.read(HttpServletAdapter.java:571)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:307)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:250)
    at com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:133)
    at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)
    ... 32 more
    Can anyone help me out with this.
    Regards,
    Garima

    It seems that one of the providers was mis-configured (the first service called) :
    HTTP Transport Configuration      
    Follow HTTP redirects      DISABLED
    Use Chunked Streaming Mode      ENABLED
    when I enabled the HTTP redirect then the problem went away...
    HTTP Transport Configuration      
    Follow HTTP redirects      ENABLED
    Use Chunked Streaming Mode      DISABLED

  • Illegal characters in SOAP message

    Hi
    I consistently get the following in the server log (I'm using JAX-WS 2.1):
    Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:292)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:174)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:296)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ... 52 more
    Is there any way to avoid having to parse illegal characters in the HTTP SOAP request? E.g. by stripping off BOM (byte order mark) characters prior to conversion to SOAP?
    Help much appreciated,
    Lance

    Hi lance,
    Hi
    I consistently get the following in the server log (I'm using JAX-WS 2.1):
    Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:292)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
    Message: Content is not allowed in prolog.
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:174)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:296)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ... 52 more
    [Look here|http://forums.java.net/jive/message.jspa?messageID=194629]
    seems trivial !!
    the same msg comes up for various issues related to SOAP requests...
    Is there any way to avoid having to parse illegal characters in the HTTP SOAP request? E.g. by stripping off BOM (byte order mark) characters prior to conversion to SOAP?
    Not sure if there is ?
    You have to ensure no illegal characters exists in the SOAP request (Rather than looking for a work around) ; )
    Help much appreciated,
    Lance

  • Need Code to Print SOAP Message

    I'm using SAAJ to create SOAP messages and I'm looking for code that will print a SOAP message, including all tags, attributes, etc. as it would look if it had been hand-coded.
    I've searched through this forum and found some similar posts, but the answers either just use the SOAPMessage writeTo() method, or do not print output formatted the way I want.
    Is it possible to do this?
    Thanks.

    Hello.
    Try this (soapMessage is your SoapMessage object instance that you created)
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    soapMessage.writeTo( outputStream );
    byte[] byteArray = outputStream.toByteArray();
    String soapMsg = new String( byteArray, "UTF-8");
    // print the soapMsg
    Hope this helps.

  • Can I create a SOAP message object from a string?

    can i create a soap message object in saaj with a string containing soap xml?
    I know messageFactory has a constructor that
    public abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in)
    does anyone know how to use this? Specifically transform a SOAP message in string format to something i could pass this constructor.
    Is there a better way to do this?
    I'm not EVER going to use apache's tomcat or GLUE or anyting and need to send a soap message from a client to a server via SOAP. I need to be able to transfer a String SOAP document to something i can search for elements with.

    sorry for being critical but the tutorial you just linked to is for the most part USELESS. it doesnt deal with Java just what a SOAP message looks like. yeah, i get it, its like xml. now how do i do what i want to with saaj?
    something like
    String sm;
    sm = in.readLine(); //gives me a whole SOAP document (pretend)
    sm--->>>MAGIC------>>>>>MIMEHeaders headers & InputStream sm_in
    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage message = factory.createMessage(headers, sm_in);
    SOAPBody soapBody = message.getSOAPBody();
    Name bodyName = factory.createName("YUP","m","http://theinternet/YUP");
    Iterator iterator = soapBody.getChildElements(bodyName);
    SOAPBodyElement bodyElement = (SOAPBodyElement)iterator.next();
    String yup = bodyElement.getValue();
    System.out.println("YUP element of the SOAP document is " + yup);what is the MAGIC in the above code?

  • Creating a SOAP message

    Getting:
    javax.xml.soap.SOAPException: Unable to create SOAP connection factory: Provider com.sun.xml.messaging.client.p2p.HttpSOAPConnectionFactory not found
    when running:
    SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
    SOAPConnection connection = scf.createConnection();
    Why?

    Actually the problem here has nothing to do with importing jar files.
    The Factory finder for the SOAPConnectionFactory actually looks for places for the HttpSoapConnectionFactory before it tries the one in the code.
    1)it first look in you System properties:
    ie System.getProperty("javax.xml.soap.SOAPConnectionFactory")
    2)then it looks for the same thing in you java.home\lib\jaxm.properties for the same thing.
    3)then it reads from the ClassLoader.getSystemResourceAsStream("META-INF/services/javax.xml.soap.SOAPConnectionFactory");
    4)Last it trys the one from the SOAPConnectionFactory which is correct.
    I am using WebLogic so I am guessing it is getting confused at # 3 so I just set the system property
    javax.xml.soap.SOAPConnectionFactory=com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory
    Number two is a good option too.
    Way too confusing.

  • Creating, Sending, Receive + Parsing SOAP messages

    Hi all
    I have a requirement to set up a system to send and receive SOAP messages. I googled for some tutorials and found one that used an Apache library. But I also see that Java 6 has got quite a bit of SOAP built-in. Are the built-in SOAP classes ready for prime time or should I use apache?
    If anyone has a code snippet they could post that would also be appreciated.

    JAX-WS (which is part of Java 6) is definitely ready for prime time.
    It's also a whole lot easier to use.
    I'd definitely go with the JAX-WS route.

  • Exception created : flex.messaging.security.SecurityException

    Hi ,
    The message below keep appearing in the systemout.log file. Any idea?
    00002ca4 webcontainer  E com.ibm.ws.webcontainer.WebContainer handleRequest SRVE0255E: A WebGroup/Virtual Host to handle / has not been defined.
    00002ca4 servlet       E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet documents in application LiveCycleES2. Exception created : flex.messaging.security.SecurityException
        at com.adobe.workspace.users.Authentication.validateContext(Authentication.java:445)
        at com.adobe.workspace.tasks.DocumentServlet.doGet(DocumentServlet.java:166)
    00002ca4 webcontainer  E com.ibm.ws.webcontainer.WebContainer handleRequest SRVE0255E: A WebGroup/Virtual Host to handle / has not been defined.
    00002ca4 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[documents]: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: Method PROPFIND is not defined in RFC 2068 and is not supported by the Servlet API
        at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext. java:637)
        at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java:1187)
    -Dhiyane

    Hello Nitin,
    i didnt say that its working fine with ATG REST. i mentioned that its working fine with 10.0.2 version of ATG but not with ATG10.1.1 . Also i am using SOAP only in both the versions. i am getting the boolean exception in the line where will i pass username, password and ispasswordEncrpted. i am passing defalut username,
    password and false(ispasswordencrypted).
    so can you help me on this.
    i am pasting my clinet program here
    public class LoginClient {
      * @param args
      * @throws RemoteException
      * @throws ServletException
      * @throws SecurityException
      * @throws ServiceException
      public static void main(String[] args) throws SecurityException, ServletException, RemoteException, ServiceException {
      /*System.getProperties().put("socksProxyHost", "172.26.183.65");
      System.getProperties().put("socksProxyPort", "8180");*/
      LoginUserSEIService loginService = new LoginUserSEIServiceLocator();
      LoginUserSEI loginStub = loginService.getLoginUserSEIPort();
      org.apache.axis.client.Stub axisStub = (org.apache.axis.client.Stub) loginStub;
      CookieContainer cookieContainer = new CookieContainer();
      axisStub.setMaintainSession(true);
      // Don't allow XML elements to reference other XML elements
      axisStub._setProperty(AxisEngine.PROP_DOMULTIREFS, new Boolean(false));
      // Push cookies onto the Stub
      cookieContainer.pushCookies(axisStub);
      String userId = loginStub.loginUser("[email protected]", " password", false);
      // Get cookies out of the Stub, and pass them to subsequent calls as needed
      cookieContainer.extractCookies(axisStub);
      System.out.println("User ID : " + userId);

Maybe you are looking for

  • Will Windows 7 domain policies work with new Windows 8 workstations?

    Dear all, We have five number of Windows 7 processional workstations in our Organization. Now company decided to replace these workstations to windows 8 professional. My questions is these five new windows 8 workstations are in work group.  I will ad

  • OHD ISSUE

    Hi iam donig open hub services for Delivery Header Data  2LIS_12_VCITM  extracting data to my local file .But when iam giving the datasource in the open hub services Getting error :-Template 2LIS_12_VCITM  does not exist. What iam asking is can we  r

  • Can't view .mov files

    Hi, I periodically will click on files labeled as .mov, but when QuickTime starts up I get a message saying a plug-in is needed. Then since I don't knowwhat to download and I try the file again the error message doesn't show, but the QuickTime windo

  • How to replace #MISSING with 0 in Hyperion Financial Report

    I am developing report in Hyperion Financial Reporting Studio. The report shows #MISSING for no data and does not look nice. I want to replace #MISSING with 0 (Like I did in SmartVIEW). However, I could not find a way to do that in Financial Reportin

  • Apps won't run on other computers - please help!

    I am using xCode 3.0 with Leopard. I can not get my Apps to run on any other computer except the one I am compiling on. They run just fine on my own computer. But even the most simple App, just a project cocoa shell, will not run on my other computer