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

Similar Messages

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

  • How To : Call External Webservice from BPEL and pass SOAP Message to the WS

    Hello All-
    Greetings to all BPEL gurus. I am currently facing difficulties in calling an External Webservice from my BPEL Process and passing SOAP Message to it. The details are below:
    <strong>1. The BPEL process, using database polling feature of DB Adapter, will get the records from the database.</strong>
    <strong>2. Transform the message</strong>
    <strong>3. Call the External Webservice and pass the transformed message as the input to it. However the Webservice expects the BPEL process to send SOAP headers in the input message.</strong>
    I am struggling on how to put the transformed message within a SOAP envelope in the BPEL process.
    If anyone had similar requirements and have successfully been able to send SOAP messages from BPEL process to an external webservice, kindly let me know.
    Also if there is some kind of documentation or any link in the forum that I can refer, please let me know that as well.
    I am new to Webservice integration using BPEL and would really appreciate your help.
    Thanks In Advance
    Regards,
    Dibya

    Hi Dharmendra,
    I am trying to send a SOAP message from my BPEL process to a web service. I have a complete SOAP message in a complex variable defined in the wsdl for the partnerlink (web service). My problem is that when I invoke the partnerlink it fails even though the content shown in the BPEL console looks valid.
    I have set up obtunnel to see what I am actually sending out from BPEL. You mention that BPEL creates the SOAP envelope automatically.
    I think that my problem is a result of this automatic SOAP envelope that BPEL is creating. Do you know if there is a way to turn it off?
    This is what I see in the TCP monitor, please note the double SOAP env:Body:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <RCMR_IN000002NR01 xmlns="urn:hl7-org:v3" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <env:Header>
    <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://testhost/CCS/Service_Endpoint</wsa:To>
    <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost/CCS/Service_Endpoint</wsa:Address>
    <wsa:Metadata>
    <device xmlns:hl7="urn:hl7-org:v3">
    </device>
    </wsa:Metadata>
    </env:Header>
    <env:Body>
    <RCMR_IN000002NR01>
    </RCMR_IN000002NR01>
    </env:Body>
    </RCMR_IN000002NR01>
    </env:Body>
    </env:Envelope>
    Any help is appreciated.
    Regards,
    Aagaard
    Edited by: Aagaard on Oct 30, 2008 8:59 PM
    Should have mentioned. I am using BPEL 10.1.3.4
    Edited by: Aagaard on Oct 31, 2008 8:43 AM
    I have opened a new thread for this question so as to not confuse the issue more than necessary.
    How many SOAP envelopes do you really need?

  • Store-and-forward SOAP messaging in JAX-RPC ??

    JAXM seems dead (although SAAJ lives and is very useful). I want to implement a store-and-forward SOAP messaging system for EAI and give it a Java API. Can I do this in JAX-RPC? Does it make any sense?
    Thanks,
    Mark

    At Java One they were advocating the use of web services over JMS.

  • WSE3.0 encrpyt and sign soap message together with disabled WSAdressing

    Good Morning,
    my task is to develop client´s applications written in .net4 who calls webservice (written by other- foreign firm in Java). My application, which calls webservice of other firm are: (plugin of MS CRM 2013, windowservice, windowformsapp for testing this communication)..
    I had to implement encrypt and sign comunication with this webservice by client and servers certifikate.
    I implemented this functions from:
    http://msdn.microsoft.com/en-us/library/aa528788.aspx
    and
    http://msdn.microsoft.com/en-us/library/aa529565.aspx
    by WSE 3.0.
    Now I have to implement to disable WSAdresing in soap messege. Is it possible to use encrypt and sign from WSE together with disabled WSadressing?
    (Other firm needs so as nodes of WSA will not be in soap message). With nodes WSAdresing in soap message, my communication with other webservice do not works. They (other firm) require no WSA nodes in soap message
    If it is posible, how to implement this functionality?

    Hi Matesak,
    I'm afraid this is not the most suitable forum for your question. Please open a new thread in this forum, you'll get more valuable responses.
    ASP.NET Forums >
    Advanced ASP.NET >
    WCF, ASMX and other Web Services
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help: Using Axis, how to log all incoming and outgoing soap messages??

    Hi all,
    I have a big problem which probably got a simple solution:
    I need to log all incoming messages, and all outgoing messages (request - response).
    I do not want any other information than this. I have tested the log4j and all I get is a LOT of debug information but not the messages as the arrive/leave the system.
    Please help me with this since it is a big problem for me that I cant debug my applications in the way I want...

    I would preffer not to use the tcpmonitor on my server, don�t want to change ports, etc.. I want a better solution which I can choose myself when to use, and that can directly log to my log-database...
    Sorry but tcpmonitor is not a solution here, even though it is a good monitor program

  • Firefox presenting random ads, websites, and reset connection messages.

    A few days ago, I was presented with a bunch of random ads that would pop up on google and random articles I had been reading. I have also been having trouble with the connection supposedly resetting on multiple occasions, very often.
    If someone will tell me how to upload screenshots, I can show pictures of the problems I am having. Thanks!

    I think it may be a malware or spyware that's troubling you. Try add-on named Ghostery, it might help.
    Anyways, you can use the "Print screen" button on your key board and paste it in Paint or similar program.
    1] Bring up the screen that you need screen shot of.
    2] Just press "print screen" button.
    3] Open "Paint" (if you are using windows, other OS I dont know whether it works!).
    4] Select "Selection tool" in paint.
    5] Press "Ctrl+V" in paint to paste the screen shot that you need.
    6] Save as .jpg or .png file.

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

  • UDF to populate soap message

    Hi all,
    We are doing soap interface. In that in one mapping we have to call Business Service and Communication Channel (SOAP adpter). Use the input to the UDF to create and populate soap message to be sent.
    How can we achieve this and please give me the sujjestions..
    thanks in advance.
    regards
    manoj

    Hi,
    use this blog by Bhavesh:
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

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

  • Error in decoding SOAP Message  :_(

    Anybody has never got these exceptions:
    "Error in decoding SOAP Message",
    and
    "Cannot find the dispatch method"
    I'm handling outbound soap message and inbound soap message either
    on server side and client side.
    On server side I obtain following exception: (you can see also my personal debbugger :-P)
    ---Server Inbound SOAP message---|#]
    Decrypting message and rebuilding Valuees... |#]
    Inizio decodifica|#]
    . decodifica terminata!
    --found following string: <ns1:addiziona><num1>80</num1><num2>22222</num2></ns1:addiziona>|#]
    ...MESSAGE Restored.|#]
    <?xml version="1.0" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ns1="http://calculator.me.org/" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <soapenv:Body>
    <ns1:addiziona>
    <num1>80</num1><num2>22222</num2>
    </ns1:addiziona></soapenv:Body>
    </soapenv:Envelope>|#]
    Error in decoding SOAP Message
    Error in decoding SOAP Message
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:89)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.toMessageInfo(SOAPMessageDispatcher.java:187)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher$SoapInvoker.invoke(SOAPMessageDispatcher.java:571)
            at com.sun.xml.ws.protocol.soap.server.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:145)
            at com.sun.xml.ws.server.Tie.handle(Tie.java:88)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(Ejb3MessageDispatcher.java:160)
            at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(Ejb3MessageDispatcher.java:89)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(EjbWebServiceServlet.java:178)
            at com.sun.enterprise.webservice.EjbWebServiceServlet.service(EjbWebServiceServlet.java:109)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at com.sun.enterprise.web.AdHocContextValve.invoke(AdHocContextValve.java:100)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:71)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.xml.ws.soap.SOAPFaultException: Cannot find the dispatch method
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.raiseFault(SOAPDecoder.java:674)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.decodeDispatchMethod(SOAPXMLDecoder.java:152)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBodyContent(SOAPDecoder.java:337)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeBody(SOAPDecoder.java:327)
            at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:250)
            at com.sun.xml.ws.encoding.soap.server.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:81)
            ... 29 more
    |#]
    --->handleFault O_o<---|#]Shad
    P.s. AS 9
    Pps Heeeeeeeeeeeeeelp! :_|

    Is the package of this class file org.me.calculator
    ?Yes, package is org.me.calculator .
    >
    I am asking these questions because : the error
    "cannot find dispatch method" can happen is there is
    a mismatch in the targetNameSpace. Ok, I understand. But I believe that I insert some horror within code :-)
    Or, if you do not
    mind sharing your application, please use the
    GlassFish user alias ([email protected] -
    you may have to subscribe to project glassfish (
    https://glassfish.dev.java.net) mails) and mail us
    the app - we will debug it for youOh, I can sharing my application. It must be a sample for understanding Sun's environment, web services world and see handling/security messages. But my simple sample become too great for me :-P
    Really, this is my experiment:
    --server: a simple ws with "add" service.
    --client: a session bean that would use ws.
    This step works. Next step:
    --Client create a SOAP request, sign it, encrypt it and send.
    --Server check signature, decrypt soap element, add two number and
    send a clear response.
    In this step I obtain: error in decode...etc etc
    Client seems works (create, sign, encrypt e send).
    I'm trying to works at programming level (with handlers).
    I don't want to use application level security for two reasons:
    1. If I use it, I don't learn in depth WS-Security and other..
    2. I tried to use it, but it did works only on server side, as a matter of fact, client doesn't manage signing and encrypting soap message (sure, I tried with other example, perhaps totally wrong :-P)
    >
    Please let us know what works for youI come from JBOSS(WS) and JbossIDE (Eclipse with jboss plug-in). I think NetBeans and SUN AS are ahead of jboss.
    If you want see a bad example of design, coding and all regarding java, you can see my sample-project :-P
    Web services:
    http://slide.altervista.org/SUN/CalculatorWSApplication-webservices.rar
    Client:
    http://slide.altervista.org/SUN/CalculatorWSBeanClient.rar
    (Client is really rough... :_) )
    Thank you for watching my problem and I apologize about my English.
    Simone

  • ASA reset-I and reset-O

    Hi there, 
    I have a couple of questions regarding Reset-I and Reset-O messages on the Cisco ASA.  I read a document that Reset-I will appear on the ASA if the inside host resets the connection, but what denotes an 'Inside' host?  Is the inside host determined based on the context of the connection? for example If a host on the internet initiated a connection to a host in the DMZ, and the internet host sent the reset would this be logged as a 'Reset-I' because although the host was on the internet it was the side initiating the connection.
    Also.. the same document said that the Reset was sent to the ASA as an indication to drop the connection, but the hosts wouldnt know about the ASA, so isnt the reset actually sent to the host with which they are communicating?
    Last question - What would actually cause a connection to be reset, as it says resets are sent after the TCP connection has been established.

    Hi,
    It is actually on the basis of the Security level. If the reset is sent from the Higher Security level , then it will be "RESET-I" and if from the lower level "RESET-O".
    I think if you go through this document and the command , you would understand the behavior of ASA sending the RESETS.
    http://www.cisco.com/c/en/us/td/docs/security/asa/asa-command-reference/S/cmdref3/s1.html#pgfId-1452931
    Thanks and Regards,
    Vibhor Amrodia

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

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

  • OSB - log SOAP messages

    Hi!
    I would like to check the outbound and inbound SOAP messages, can I do it?
    So I have got a business service which calls remote webservice (OSB is a client here), i have to check the content of SOAP message (i use WS-security policy: digital signature, username+password)
    Thank You very mucH!
    Viktor

    Hi Anuj!
    Thank You for Your answer!
    I have got a Routing action in my proxy service (which calls a business service), I see this on test console after I call the proxy service:
    RouteNode1
    Routed Service
    +$outbound+
    +$body+
    +$header+
    +$attachments+
    Message Context Changes
    added $outbound
    changed $body
    changed $attachments
    changed $inbound
    changed $header
    So after the Message Context Changes I can see the eventual SOAP header which OSB will send?
    I think I can't because the changed $body contains this XML:
    +<soap:Body ...>+
    +<soap:Fault>+
    +<faultcode>code:FailedAuthentication</faultcode>+
    +<faultstring>The security token could not be authenticated or authorized</faultstring>+
    +<faultactor>https://...</faultactor>+
    +</soap:Fault>+
    +</soap:Body>+
    I get this message back from remote webservice so the header above belongs to remote ws as well.
    Or do I think badly?
    Thanks!

Maybe you are looking for

  • Need Information on Support  Project

    Hi, I am new to Production and support  project whta r the points we need to discuss with the clints in support prj.. what r the responsibilities in support prj Any one of u send me the docs for the Production and support project Thanks in Advance, P

  • How to read a file in another location using Java ?

    Hi all, i suppose the below code reads my file 'ridata.dat' when it is in the same folder as my java class file. How can i read it from a different location? ---------------------------------------------------------------FileRead.java----------------

  • May i know how to copy music from my computer?

    may i know how to copy music from my computer to ipad?

  • HELP -- panasonic MXF import to FCP7 with OSX/Lion???

    Is there a Panasonic Plugin to import MXF material via the Log-n-Transfer within FCP7?   Panasonic's site is AWFUL and I'm out of luck.  Right now the L&T window sees the P2 material but is only showing AVC-Intra as a source format so it's ignoring t

  • Error Message with attempt to sync pc desktop...COL Transbase FillDelfolderinfo

    I am trying to sync my new Bold 9930  device to pc desktop (MS Outlook) and I get an error message: COL Transbase FillDelfolderinfo. Unable to get default folder for Contacts (same message for calendar, tasks and memo). I have not had any trouble bef