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

Similar Messages

  • How to view the SOAP message in a web service call + Urgent

    Hi All,
    Iam trying to test a web service call(Iam using CXF). But I need to view SOAP message sent to web service or need to debug the web service call. Please help me on this regard with example.

    Yes. to find any tcp monitor, define a listen port number, task host and port number, changing your request to listen post, then you can monitor TCP/IP like
    HTTP/1.1 200 OK
    Set-Cookie: JSESSIONID=7A00BD65EF7516AD8947359A25C4D98B; Path=/ComponentName
    Content-Type: text/xml;charset=utf-8
    Date: Wed, 20 Oct 2004 15:45:03 GMT
    Server: Apache-Coyote/1.1
    Connection: close
    <?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>
    <ns1:testObjectResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ComponentName">
    <testObjectReturn href="#id0"/>
    </ns1:testObjectResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MyObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ComponentName">
    <name xsi:type="xsd:string">Set Name</name>
    <value xsi:type="xsd:string">set Value</value>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    Lixin

  • How to intercept the soap messages.

    hi,
    I have developed a web service using jax-rpc. i know that when a client invokes the web service a SOAP message is sent to the server. Is there any tool that can intercept the SOAP message so that i can edit the message before it is sent to the server. I tried to download this tool called soapmonitor from westbridgetech.com but the site was not working. please help.
    regards,
    kartik.

    Maybe TCPMon would do the trick for you:
    http://ws.apache.org/commons/tcpmon/tcpmontutorial.html

  • How to get full SOAP message sent from XI to web srvice

    Hi guys!
    In my scenario IDoc->XI->SOAP I need to see the SOAP message, which arrives into target web service. Where can I see it? I suppose in sxmb monitor, but which part? I can not find it...
    Thanx, Olian

    In MONi you will only be able to see the XML payload or rather the SOAP Body.
    If you want to see the entire HTTP post message used by the SOAP adapter will the SOAP Enevlope you need to use either,
    1. The TCP Gateway as shown in Stefan's Blog
    or,
    2. Follow the instructions in this thread. You would need to turn on Synch Logging in the Visual Admin for this though,
    Monitoring SOAP Message Payload
    I would suggest you follow Stefan's blog as it is quite simple rather than turning on Synch Logging in the Va.
    Regards
    Bhavesh

  • How to get soap message sent out

    Hi,
    I used a client proxy in ABAP to consume a web service.
    However I got errors saying there is 'Unexpected elemement' in SOAP message.
    To find out the root cause, i would like to get the soap message sent out from the proxy.
    Is there any way to do that?

    Thanks to all your guys

  • I need to secure SOAP message sent into SOAP adapter, how to?

    Hi guys,
    My scenario uses SOAP and I need to secure this SOAP message sent into SOAP adapter. As I have read in the documentation, HTTPS is possible only on the SOAP receiver adapter. But my is SENDER.
    COuld you help me please, how to solve it? Or post some link? Or, if you have your own approach, to let me know?
    Thanx, Peter

    Hi,
    you can use SSL with the sender adapter. Please see the extract of the SOAP Adapter FAQ (Note #856597) below:
    <b>Q:</b> Can I use SSL for my sender adapter?
    <b>A:</b> Yes. Normally, the SOAP adapter servlet runs on the engines HTTP port. But you can activate the engine's HTTPS port so that this servlet can receive messages sent to the HTTPS port. See the documentation about the J2EE engine's security configuration.
    I am afraid, I haven't yet tried this myself, so you will need to consult the J2EE documentation.
    Regards,
    HC

  • How to save the Response message from SOAP adapter

    Dear Friends,
       I am sending the FIle details webserver.here sender is FILE adapter and receiver is SOAP adapter.
    FIle to SOAP working successfully, but I need response from SOAP.
    Sender QoS is BE, so the response is coming to XI, but in SXMB_MONI it is showing DO YOU WANT TO SAVE IT or DISPLAY IT.
    my requirement is response message is directly updated in XI system.
    For response Can I use BPM or which method I need to use.
    Please suggest me  how to do the resonse message(SOAP to FILE).
    Regards,
    Shalini Shah.

    Sender QoS is BE,
    File adapter does not support sync communication. Therefore the scenario won't work as it is.
    What are you planning to do with the response? If you want to process is further, then:
    1. One way without BPM would be use of adapter module.
    File - RFC - File without a BPM - Possible from SP 19.
    2. Or you may use BPM with Async Sync bridge
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Regards,
    Prateek

  • How can I view the text messages sent and received from my phone?how can I view the past text messages sent to my phone

    How can I view the text messages sent and received on one of the other phones on my plan?

    You would have to view them on the other phone.

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • How to calculate the number of sent/received emails of a certain domain

    Thank you for what you have helped me with!
    How to calculate the number of sent/received emails of a certain domain in a certain period? It is Messaging Server 5.2, Directory Server 4.2. Is there a log option for this?
    Thank you.

    Not sure where you find, "LOG_MESSSAGE_ADD". I don't actually find this option in the documentation.
    The domains that mails are coming from and being sent to are certainly logged in the normal mail.log, so why mess with additional logging options? If you're talking about "LOG_CONNECTION", I actually see no additional data that is useful to you.
    If you decide to change the option.dat, you do indeed need to
    imsimta cnbuild (note, it's not cnrebuild)
    imsimta restart
    If I were facing the same issue, I'd be looking at the log parsing perl script, and simply modifying it to do what I wanted.

  • Missing Namespace with the SOAP msg sent by C#

    Hi All,
    The wsdl file is generated by SAP XI. I used the XMLSpy to test it and get successful response.
    Then I used wsdl.exe of .net 2.0 sdk to generate the C# proxy class, and use csc.exe to compile it to a dll, and then refer it in the project. After sent the soap message by C#, the XI shows the message is wrong, then I compare this soap envelop body with the one I sent by the XMLSpy as follow:
    C#:
    <MT_PP_014_PrdOrderGoodsRcv xmlns="http://mycompany.com/xi/sap/system/pp">
    <content>
    </content>
    </MT_PP_014_PrdOrderGoodsRcv>
    XMLSPY:
    <m:MT_PP_014_PrdOrderGoodsRcv xmlns:m="http://mycompany.com/xi/sap/system/pp">
    <content>
    </content>
    </m:MT_PP_014_PrdOrderGoodsRcv>
    so it is the namespace, according the xml generated by C#, the MT_PP_014_PrdOrderGoodsRcv element isn't inlucded in the namespace http://mycompany.com/xi/sap/system/pp, which cause the error.
    Anyone know how to fix it?
    Thanks and B'Rgds,

    Hi YiNing,
    the message created by C# is indeed wrong.
    Check that in XMLSpy message, the default namespace is never set and that the message namespace is set to prefix "m" and that only the root tag is included in this namespace. All the other tags have no namespace (since they are not attached to any namespace prefix) or have the default namespace, which was not set.
    On the other hand, in the C# message, the default namespace is set in the root tag. The root tag is related to the default namespace (it has no prefix) and hence it has the proper namespace. However, the other tags are also related to the default namespace (no namespace prefix) which was set. So these other tags are the erroneous ones.
    Try to check that in your proxy, but it seems like a bug in the proxy generator application.
    Just as a test, send the message from C# in a request from XMLSpy (replace the automatically generated message inside SOAP Body). The same error would be expected.
    Also as a test, send this message in XMLSpy:
    <MT_PP_014_PrdOrderGoodsRcv xmlns="http://mycompany.com/xi/sap/system/pp">
    <content xmlns="">
    </content>
    </MT_PP_014_PrdOrderGoodsRcv>
    Regards,
    Henrique.

  • Changing the value of the SOAPElement in the SOAP message

    Now another problem I encountered was of overwriting a value in the SOAP message by my value. SOAPElement interface which extends Node interface provides me the method getValue() to get the value of the node but doesnt give me any method to set any other value instead of this.
    <token xsi:type="xsd:string">token123</token>
    I want to replace the value "token123" with my value.
    Is there no provision for altering a value in the SOAP message? Is this due to security contraints?
    If yes then can we detach the same node and add a similar node with the new value. I wanted to try the same using addChildElements() method but then the problem here is how do I create a new SOAPElement in the handler as its an interface and not a class. Why I want to add a similar node is because I am having the definition of this object in the WSDL file, so if I attach the node corresponding to the parameter of the object then I would get the object populated with this value at J2EE or .net layer.
    Also I thought of adding an attribute to the same node but then since this attribute will not be defined in the WSDL, the value of this attribute will not populate the java object at the J2EE layer. Hence attribute introduction also didnt help.
    This is the userData object in the soap body:
    </q1:FetchDetailsInput><q2:UserData xmlns:q2="java:com.anthem.enb.common.data" xsi:type="q2:UserData" id="id2">
    <password xsi:type="xsd:string">12345</password>
    <token xsi:type="xsd:string">token123</token>
    <userID xsi:type="xsd:string">vikas123</userID>
    </q2:UserData>
    This is my code to extract the values from the above message:
    Iterator i = ctx.getMessage().getSOAPPart().getEnvelope().getBody().getChildElements();
    System.out.println(" i.hasNext() =" + i.hasNext());
    while (i.hasNext())
    Object obj = i.next();
    System.out.println(" obj :" + obj.getClass());
    if (obj instanceof SOAPElement)
    SOAPElement e = (SOAPElement) obj;
    System.out.println("e :" + e);
    String operationName = e.getElementName().getLocalName();
    LOG.info(CLASS_NAME + "operationName :" + operationName);
    if (operationName.equals("UserData"))
    Iterator j = e.getChildElements();
    LOG.info(CLASS_NAME + " j.hasNext() : " + j.hasNext());
    while (j.hasNext())
    Object obj2 = j.next();
    LOG.info(CLASS_NAME + " obj2 :" + obj2);
    LOG.info(CLASS_NAME + " obj2 :" + obj2.getClass());
    if (obj2 instanceof SOAPElement)
    SOAPElement eGrandChild = (SOAPElement) obj2;
    String operationName2 =
    eGrandChild.getElementName().getLocalName();
    if (operationName2.equals("userID"))
    String strPass = eGrandChild.getValue();
    LOG.info(CLASS_NAME + " strPass:" + strPass);
    else if (operationName2.equals("password"))
    String strUserID = eGrandChild.getValue();
    LOG.info(CLASS_NAME + " strUserID:" + strUserID);
    else if (operationName2.equals("token"))
    String strToken = eGrandChild.getValue();
    Please help.

    how do I create a new SOAPElement in the handler as its an interface and not a class?Here is an example:
    <example>
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement fResponse =
    body.addBodyElement(env.createName("fResponse"));
    fResponse.addAttribute(env.createName("encodingStyle"),
    "http://schemas.xmlsoap.org/soap/encoding/");
    SOAPElement result =
    fResponse.addChildElement(env.createName("result"));
    result.addTextNode("test");
    ctx.setMessage(m);
    </example>
    Jong

  • Monitoring incoming SOAP messages

    Dear all,
    I configured a SOAP scenario and provided the customer the URL, but the messages did not arrived our PI System.
    After an analysis I think I configured the CC wrong. I set the adapter engine to Central AE instead of our AAE that is
    also used in the Web Service URL.
    But even after changing it, the message does not arrive the system.
    How can I check if the message perhaps arrive the PI but did not pass caused but (probably) a wrong configuration?
    Now after changing it to AAE, will it be displayed in DefaultTrace in NWA? I couldn't found there anything.
    Regards
    Chris

    Hi,
    Try XPI inspector to monitor incoming SOAP message. You will get exact error if any.
    Have a look to below blog -
    Sender SOAP Adapter: HTTPS with Client Authentication
    Regards
    Aashish Sinha

  • 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

  • Printing SOAP message sent / received

    We've developed a web service that allows a client to send and receive the expected data from a java and a .net client. We're having a problem however when instantiating an object to pass as a param to the webservice from the .net client. It works fine with java primitive type or String - we've tested this. But when we create a class that has a three strings as attributes, none of the params are getting across - the object isn't null, its just marshalled or unmarshalled incorrectly (we think).
    What I need to know is how to turn on some type of verbosity so I can see the soap message when using the external .net client? I can see the message fine on the java side, but not when invoking from .net.

    You could also monitor this from the .NET client end. One approach is to
    write a SOAP extension to intercept the AfterSerialize and BeforeDeserialize
    events. Here's a sample code that logs the SOAP request and response:
    http://msdn.microsoft.com/library/en-us/cpguide/html/cpconalteringsoapmessag
    eusingsoapextensions.asp
    Jorge
    "Andrew Bray" <[email protected]> wrote in message
    news:[email protected]..
    We've developed a web service that allows a client to send and receive theexpected data from a java and a .net client. We're having a problem however
    when instantiating an object to pass as a param to the webservice from the
    .net client. It works fine with java primitive type or String - we've
    tested this. But when we create a class that has a three strings as
    attributes, none of the params are getting across - the object isn't null,
    its just marshalled or unmarshalled incorrectly (we think).
    >
    What I need to know is how to turn on some type of verbosity so I can seethe soap message when using the external .net client? I can see the message
    fine on the java side, but not when invoking from .net.

Maybe you are looking for

  • How can I transfer mailboxes from one computer to another?

    How can transfer all mailboxes(and their contents from one MBP to another? Migration assistant was no help.

  • Creating Partitions in Oracle 10G Express Edition

    Can I create partitions in oracle 10g express edition?

  • Xalan gui xml

    I am trying to program a java swing gui with one button that will transform old.xml to new.xml using transform.xsl using xalan but the compiler gives an error message: Transform2.java:53: unreported exception javax.xml.transform.TransformerException;

  • Connect a tablet as input method or push asynchronously data from the WebAs

    If have to connect a tablet to a WebDynpro application. Not a tablet PC or something, just an ordinary tablet. This is one of those big plates with hundreds of imaginary buttons. The user pushes with a pen some imaginary buttons on the tablet and the

  • Check for the logon message server

    Hello All, in order to ensure the advantages of the load balancing we want to check if the user has used the message server for the logon to the SAP system. There is the function module EXIT_SAPLSUSF_001 that is called after each logon and we could i