Author: jeff.yuchang
Date: 2010-03-12 12:26:47 -0500 (Fri, 12 Mar 2010)
New Revision: 570
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_response1.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/WEB-INF/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/WEB-INF/web.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/myhandler.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/ComponentSMSCTBC.java
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/HandleLogging.java
Removed:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/Component-SMSCTBC-1.0.0.war
Modified:
trunk/integration-tests/build.xml
trunk/integration-tests/pom.xml
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml
Log:
* RIFTSAW-178, finished test case for RIFTSAW-163.
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-03-12 09:01:16 UTC (rev 569)
+++ trunk/integration-tests/build.xml 2010-03-12 17:26:47 UTC (rev 570)
@@ -144,8 +144,7 @@
<ant antfile="src/test/resources/testcases/RiftSaw_118/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_144/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_154/build.xml" />
- <!--comment out the 163 test case for now -->
- <!--ant antfile="src/test/resources/testcases/RiftSaw_163/build.xml"
/-->
+ <ant antfile="src/test/resources/testcases/RiftSaw_163/build.xml" />
<ant antfile="src/test/resources/testcases/RiftSaw_70/build.xml" />
</target>
Modified: trunk/integration-tests/pom.xml
===================================================================
--- trunk/integration-tests/pom.xml 2010-03-12 09:01:16 UTC (rev 569)
+++ trunk/integration-tests/pom.xml 2010-03-12 17:26:47 UTC (rev 570)
@@ -278,7 +278,6 @@
<exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELAtmTestCase.java</exclude>
<exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELPurchaseTestCase.java</exclude>
<exclude>org/jboss/soa/bpel/tests/samples/TutorialBPELTravelAgencyTestCase.java</exclude>
- <exclude>**/*RiftSaw163TestCase.java</exclude>
</excludes>
</configuration>
<executions>
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java 2010-03-12
09:01:16 UTC (rev 569)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/testcases/RiftSaw163TestCase.java 2010-03-12
17:26:47 UTC (rev 570)
@@ -39,7 +39,7 @@
public static Test suite() {
return(new RiftSawTestSetup(RiftSaw163TestCase.class,
- TEST_NAME, "RiftSaw_163-1.jar"));
+ TEST_NAME, "RiftSaw_163.war,RiftSaw_163-1.jar"));
}
public void testSendHello() throws Exception {
@@ -47,7 +47,15 @@
"http://localhost:8080/RiftSaw_163WS");
System.out.println(result);
- //TODO: Add method for verification.
- //assertMessageFromFile(result, "hello_response1.xml");
+ // If testing against cxf, then result is presented slightly differently
+ if (result.indexOf("SOAP-ENV") != -1) {
+ result = result.replaceAll("SOAP-ENV", "env");
+ result = result.replaceAll(" xmlns=\"\"","");
+ result = result.replaceAll("\"","'");
+ result = result.replaceAll("<env:Header
/>","<env:Header></env:Header>");
+ }
+
+ // Comment out until RIFTSAW-118 is fixed
+ assertMessageFromFile(result, "hello_response1.xml");
}
}
Deleted:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/Component-SMSCTBC-1.0.0.war
===================================================================
(Binary files differ)
Modified:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl 2010-03-12
09:01:16 UTC (rev 569)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/ComponentSMSCTBC.wsdl 2010-03-12
17:26:47 UTC (rev 570)
@@ -1,57 +1,52 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<definitions name="ComponentSMSCTBCService"
- targetNamespace="http://cocreation.com.br/componentsmsctbc"
xmlns="http://schemas.xmlsoap.org/wsdl/"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://cocreation.com.br/componentsmsctbc"
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+<?xml version='1.0' encoding='UTF-8'?>
+<definitions name='ComponentSMSCTBCService'
+
targetNamespace='http://www.jboss.org/soa/bpel/testcase'
+
xmlns='http://schemas.xmlsoap.org/wsdl/'
+
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+
xmlns:tns='http://www.jboss.org/soa/bpel/testcase'
+
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:types="http://www.jboss.org/cid">
-
- <types>
+ <types>
<xsd:schema
targetNamespace="http://www.jboss.org/cid">
<xsd:element name="userName" type="xsd:string" />
</xsd:schema>
</types>
-
- <message name="ComponentSMSCTBC_sendSMSResponse">
- <part name="return" type="xsd:string" />
- </message>
-
- <message name="ComponentSMSCTBC_sendSMS">
- <part name="from" type="xsd:string" />
- <part name="to" type="xsd:string" />
- <part name="message" type="xsd:string" />
- <part name="userName" element="types:userName" />
- </message>
-
- <portType name="ComponentSMSCTBC">
- <operation name="sendSMS" parameterOrder="from to message">
- <input message="tns:ComponentSMSCTBC_sendSMS" />
- <output message="tns:ComponentSMSCTBC_sendSMSResponse" />
- </operation>
- </portType>
-
- <binding name="ComponentSMSCTBCBinding"
type="tns:ComponentSMSCTBC">
- <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="sendSMS">
- <soap:operation soapAction="" style="rpc"/>
- <input>
- <soap:body namespace="http://cocreation.com.br/componentsmsctbc"
- use="literal" parts="from to message"/>
- <soap:header message="tns:ComponentSMSCTBC_sendSMS"
+ <message name='ComponentSMSCTBC_sendSMSResponse'>
+ <part name='return' type='xsd:string'></part>
+ </message>
+ <message name='ComponentSMSCTBC_sendSMS'>
+ <part name='from' type='xsd:string'></part>
+ <part name='to' type='xsd:string'></part>
+ <part name='message' type='xsd:string'></part>
+ <part name='userName' element='types:userName' />
+ </message>
+ <portType name='ComponentSMSCTBC'>
+ <operation name='sendSMS' parameterOrder='from to message'>
+ <input message='tns:ComponentSMSCTBC_sendSMS'></input>
+ <output message='tns:ComponentSMSCTBC_sendSMSResponse'></output>
+ </operation>
+ </portType>
+ <binding name='ComponentSMSCTBCBinding'
type='tns:ComponentSMSCTBC'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='sendSMS'>
+ <soap:operation soapAction='' style="rpc"/>
+ <input>
+ <soap:body
namespace='http://www.jboss.org/soa/bpel/testcase'
use='literal' parts="from to message"/>
+ <soap:header message="tns:ComponentSMSCTBC_sendSMS"
part="userName" use="literal"/>
- </input>
- <output>
- <soap:body namespace="http://cocreation.com.br/componentsmsctbc"
- use="literal" />
- </output>
- </operation>
- </binding>
-
- <service name="ComponentSMSCTBCService">
- <port binding="tns:ComponentSMSCTBCBinding"
name="ComponentSMSCTBCPort">
- <soap:address
- location="http://localhost:8080/Component-SMSCTBC-1.0.0/ComponentSMSCTBC"
/>
- </port>
- </service>
+ </input>
+ <output>
+ <soap:body
namespace='http://www.jboss.org/soa/bpel/testcase'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='ComponentSMSCTBCService'>
+ <port binding='tns:ComponentSMSCTBCBinding'
name='ComponentSMSCTBCPort'>
+ <soap:address
location='http://127.0.0.1:8080/RiftSaw_163/ComponentSMSCTBC'/>
+ </port>
+ </service>
<plnk:partnerLinkType name="ComponentSMSPartnerLinkType">
<plnk:role name="componentsms" portType="tns:ComponentSMSCTBC"
/>
Modified:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel 2010-03-12
09:01:16 UTC (rev 569)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/HelloWorld.bpel 2010-03-12
17:26:47 UTC (rev 570)
@@ -4,7 +4,7 @@
xmlns:tns="http://www.jboss.org/bpel/examples"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
- xmlns:intf2="http://cocreation.com.br/componentsmsctbc"
+
xmlns:intf2="http://www.jboss.org/soa/bpel/testcase"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
@@ -13,7 +13,7 @@
namespace="http://www.jboss.org/bpel/examples/wsdl"
importType="http://schemas.xmlsoap.org/wsdl/" />
<import location="ComponentSMSCTBC.wsdl"
- namespace="http://cocreation.com.br/componentsmsctbc"
+
namespace="http://www.jboss.org/soa/bpel/testcase"
importType="http://schemas.xmlsoap.org/wsdl/" />
<partnerLinks>
Modified:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml 2010-03-12
09:01:16 UTC (rev 569)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/bpel/bpel-deploy.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -1,7 +1,7 @@
<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:bpl="http://www.jboss.org/bpel/examples"
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
- xmlns:intf2="http://cocreation.com.br/componentsmsctbc">
+
xmlns:intf2="http://www.jboss.org/soa/bpel/testcase">
<process name="bpl:HelloWorld">
<active>true</active>
Modified: trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml 2010-03-12
09:01:16 UTC (rev 569)
+++ trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/build.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -12,7 +12,37 @@
<property name="jar.name"
value="${ant.project.name}-${version}.jar" />
- <target name="deploy">
+ <property name="war.build.dir"
+ location="${deploy.dir}/${ant.project.name}/build/war/classes"
/>
+
+ <target name="deploywar" description="make war">
+ <!-- Compile... -->
+ <mkdir dir="${war.build.dir}" />
+ <javac srcdir="${test.dir}/war/src"
+ destdir="${war.build.dir}"
+ target="1.5"
+ debug="true"
+ fork="true">
+ </javac>
+
+ <copy todir="${war.build.dir}">
+ <fileset dir="${test.dir}/war/resources">
+ <include name="*.xml"/>
+ </fileset>
+ </copy>
+
+ <!-- War... -->
+ <war warfile="${deploy.dir}/${ant.project.name}/${ant.project.name}.war"
+ webxml="${test.dir}/war/resources/WEB-INF/web.xml">
+ <classes dir="${war.build.dir}" />
+ </war>
+ </target>
+
+ <target name="undeploywar">
+ <delete file="${deploy.dir}/${ant.project.name}/${ant.project.name}.war"
/>
+ </target>
+
+ <target name="deploy" depends="deploywar">
<echo>Deploy ${ant.project.name}</echo>
<mkdir dir="${deploy.dir}/${ant.project.name}" />
<jar basedir="${test.dir}/bpel"
destfile="${deploy.dir}/${ant.project.name}/${jar.name}" />
@@ -21,15 +51,11 @@
<fileset dir="${test.dir}/messages"/>
</copy>
- <echo message="${test.dir}/Component-SMSCTBC-1.0.0.war" />
- <copy file="${test.dir}/Component-SMSCTBC-1.0.0.war"
todir="${deploy.dir}/${ant.project.name}" />
-
</target>
- <target name="undeploy">
+ <target name="undeploy" depends="undeploywar">
<echo>Undeploy ${ant.project.name}</echo>
<delete file="${deploy.dir}/${jar.name}" />
- <delete file="${deploy.dir}/Component-SMSCTBC-1.0.0.war" />
</target>
</project>
Modified:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml 2010-03-12
09:01:16 UTC (rev 569)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_request1.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -1,8 +1,10 @@
-<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
- <soapenv:Header/>
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl"
xmlns:tes="http://www.jboss.org/soa/bpel/testcase">
+ <soapenv:Header>
+ <tes:userName>userName</tes:userName>
+ </soapenv:Header>
<soapenv:Body>
<wsdl:hello>
- <TestPart>Hello</TestPart>
+ <TestPart>This is Hello Test</TestPart>
</wsdl:hello>
</soapenv:Body>
</soapenv:Envelope>
\ No newline at end of file
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_response1.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_response1.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/messages/hello_response1.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -0,0 +1 @@
+<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:tes='http://www.jboss.org/soa/bpel/testcase'>userName<...
xmlns:odens='http://www.jboss.org/bpel/examples/wsdl'><Test...
\ No newline at end of file
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/WEB-INF/web.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/WEB-INF/web.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/WEB-INF/web.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.5"
+
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>RiftSaw_163</display-name>
+
+ <servlet>
+ <servlet-name>ComponentSMSCTBC</servlet-name>
+ <servlet-class>org.jboss.soa.bpel.testcase.ComponentSMSCTBC</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ComponentSMSCTBC</servlet-name>
+ <url-pattern>/ComponentSMSCTBC</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/myhandler.xml
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/myhandler.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/resources/myhandler.xml 2010-03-12
17:26:47 UTC (rev 570)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jws:handler-chains
xmlns:jws="http://java.sun.com/xml/ns/javaee">
+
+ <jws:handler-chain name="MyHandlerChain">
+ <jws:protocol-bindings>##SOAP11_HTTP</jws:protocol-bindings>
+ <jws:service-name-pattern
xmlns:ns1="http://www.jboss.org/soa/bpel/testcase/">ns1:*<...
+ <jws:handler>
+ <jws:handler-class>org.jboss.soa.bpel.testcase.HandleLogging</jws:handler-class>
+ </jws:handler>
+ </jws:handler-chain>
+
+</jws:handler-chains>
+
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/ComponentSMSCTBC.java
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/ComponentSMSCTBC.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/ComponentSMSCTBC.java 2010-03-12
17:26:47 UTC (rev 570)
@@ -0,0 +1,23 @@
+package org.jboss.soa.bpel.testcase;
+
+import javax.jws.HandlerChain;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+(a)HandlerChain(file="/myhandler.xml")
+@WebService(targetNamespace="http://www.jboss.org/soa/bpel/testcase")
+(a)SOAPBinding(style=Style.RPC)
+public class ComponentSMSCTBC {
+
+ @WebMethod(operationName="sendSMS")
+ public String sendSMS(@WebParam(name="from") String from
+ , @WebParam(name="to") String to
+ , @WebParam(name="message") String message) {
+
+ System.out.println(">>>>>>>>>> sendSMS
<<<<<<<<<<< " + from + " " + to + "
" + message);
+ return "Success";
+ }
+}
Added:
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/HandleLogging.java
===================================================================
---
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/HandleLogging.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/testcases/RiftSaw_163/war/src/org/jboss/soa/bpel/testcase/HandleLogging.java 2010-03-12
17:26:47 UTC (rev 570)
@@ -0,0 +1,109 @@
+package org.jboss.soa.bpel.testcase;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Node;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.w3c.dom.NodeList;
+
+public class HandleLogging implements SOAPHandler<SOAPMessageContext> {
+
+ public Set<QName> getHeaders() {
+ //System.out.println(">>>>>>. headers");
+ return null;
+ }
+
+ public void close(MessageContext arg0) {
+ //System.out.println(">>>>> close");
+ }
+
+ public boolean handleFault(SOAPMessageContext arg0) {
+ //System.out.println(">>>>> fault");
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ public boolean handleMessage(SOAPMessageContext messageContext) {
+ try {
+ Boolean outboundProperty = (Boolean)
messageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ // Mensagem chegando
+ if (!outboundProperty.booleanValue()) {
+ SOAPMessageContext sctx = (SOAPMessageContext) messageContext;
+ SOAPMessage message = sctx.getMessage();
+ SOAPPart sp = message.getSOAPPart();
+ SOAPEnvelope senv = sp.getEnvelope();
+ SOAPHeader sh = senv.getHeader();
+
+ System.out.println("1: " + senv.getNodeName());
+ Iterator it2 = senv.getChildElements();
+ while (it2.hasNext()) {
+ Object obj = it2.next();
+ if (obj instanceof SOAPHeader) {
+ SOAPHeader soapHeader = (SOAPHeader) obj;
+ System.out.println("2: \t" + soapHeader.getNodeName());
+ Iterator it3 = soapHeader.getChildElements();
+ if (it3 != null) {
+ while (it3.hasNext()) {
+ SOAPHeaderElement soapH = (SOAPHeaderElement) it3.next();
+ System.out.println("3: \t\t" + soapH.getNodeName() + ">
" + soapH.getValue());
+ }
+ }
+ }
+ if (obj instanceof SOAPBody) {
+ SOAPBody soapBody = (SOAPBody) obj;
+ Iterator it4 = soapBody.getChildElements();
+ if (it4 != null) {
+ while (it4.hasNext()) {
+ System.out.println("4: \t" + soapBody.getNodeName());
+ Object obj4 = it4.next();
+ if (obj4 instanceof SOAPBodyElement) {
+ SOAPBodyElement soapBodyElement = (SOAPBodyElement) obj4;
+ System.out.println("5: \t" + soapBodyElement.getNodeName());
+ Iterator it5 = soapBodyElement.getChildElements();
+ NodeList nl = soapBodyElement.getChildNodes();
+ if (nl != null) {
+ for (int i = 0; i < nl.getLength(); i++) {
+ System.out.println("6: \t\t" + nl.item(i).getNodeName());
+ }
+ }
+ /*Object obj5 = it5.next();
+ SOAPElement element = (SOAPElement) obj5;
+ String name = element.getNodeName();
+ System.out.println("\t\t" + name);*/
+ }
+ }
+ }
+ }
+ }
+
+
+ if (sh != null) {
+ Iterator it = sh.getChildElements();
+ while (it.hasNext()) {
+ Node node = (Node) it.next();
+ System.out.println("Name: " + node.getNodeName() + " - Value:
" + node.getValue());
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return true;
+ }
+
+}