Author: objectiser
Date: 2010-02-12 10:54:16 -0500 (Fri, 12 Feb 2010)
New Revision: 496
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-cxf.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-native.xml
Removed:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4.xml
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java
Log:
Fixed three of the loan approval integration tests on CXF - fourth one still failing due
to exception thrown from JAX-WS service not being interpreted as a SOAP/BPEL fault for
receipt by the BPEL process.
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java 2010-02-12
15:54:16 UTC (rev 496)
@@ -39,13 +39,21 @@
public static Test suite() {
return(new RiftSawTestSetup(QuickstartBPELLoanApprovalTestCase.class,
- TEST_NAME,
"Quickstart_bpel_loan_approval-1.jar,Quickstart_bpel_loan_approval.war"));
+ TEST_NAME,
"Quickstart_bpel_loan_approval.war,Quickstart_bpel_loan_approval-1.jar"));
}
public void testSendLoanRequest1() throws Exception {
String result=sendSOAPMessage("loanreq1.xml",
"http://localhost:8080/Quickstart_bpel_loan_approvalWS");
+ // 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>");
+ }
+
assertMessageFromFile(result, "loanresp1.xml");
}
@@ -53,6 +61,14 @@
String result=sendSOAPMessage("loanreq2.xml",
"http://localhost:8080/Quickstart_bpel_loan_approvalWS");
+ // 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>");
+ }
+
assertMessageFromFile(result, "loanresp2.xml");
}
@@ -60,6 +76,14 @@
String result=sendSOAPMessage("loanreq3.xml",
"http://localhost:8080/Quickstart_bpel_loan_approvalWS");
+ // 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>");
+ }
+
assertMessageFromFile(result, "loanresp3.xml");
}
@@ -67,6 +91,11 @@
String result=sendSOAPMessage("loanreq4.xml",
"http://localhost:8080/Quickstart_bpel_loan_approvalWS");
- assertMessageFromFile(result, "loanresp4.xml");
+ // If testing against cxf, then result is presented slightly differently
+ if (result.indexOf("SOAP-ENV") != -1) {
+ assertMessageFromFile(result, "loanresp4-cxf.xml");
+ } else {
+ assertMessageFromFile(result, "loanresp4-native.xml");
+ }
}
}
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-cxf.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-cxf.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-cxf.xml 2010-02-12
15:54:16 UTC (rev 496)
@@ -0,0 +1 @@
+<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">&...
/><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode
xmlns:ns0="http://example.com/loan-approval/wsdl/">ns0:unabl...
string, and possibly fault code, not set</faultstring><detail><integer
xmlns="http://example.com/loan-approval/xsd/error-messages/">...
\ No newline at end of file
Copied:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-native.xml
(from rev 487,
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4.xml)
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-native.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4-native.xml 2010-02-12
15:54:16 UTC (rev 496)
@@ -0,0 +1 @@
+<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><faul...
xmlns:valueNS='http://example.com/loan-approval/wsdl/'>valueNS...
xmlns='http://example.com/loan-approval/xsd/error-messages/'>1...
\ No newline at end of file
Deleted:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4.xml 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/messages/loanresp4.xml 2010-02-12
15:54:16 UTC (rev 496)
@@ -1 +0,0 @@
-<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:...
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><faul...
xmlns:valueNS='http://example.com/loan-approval/wsdl/'>valueNS...
xmlns='http://example.com/loan-approval/xsd/error-messages/'>1...
\ No newline at end of file
Modified:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java 2010-02-12
15:54:16 UTC (rev 496)
@@ -10,7 +10,7 @@
@WebService(targetNamespace = "http://example.com/loan-approval/wsdl/",
-endpointInterface="com.example.loan_approval.wsdl.LoanApprovalPT",
portName="loanApprover_Port")
+endpointInterface="com.example.loan_approval.wsdl.LoanApprovalPT",
serviceName="loanApprover", portName="loanApprover_Port")
public class LoanApprovalPTImpl implements LoanApprovalPT {
public String approve(String firstName, String name,
Modified:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java 2010-02-12
15:54:16 UTC (rev 496)
@@ -5,28 +5,29 @@
import javax.jws.WebService;
@WebService(
- endpointInterface="com.example.loan_approval.wsdl.RiskAssessmentPT",
- targetNamespace = "http://example.com/loan-approval/wsdl/",
- portName="riskAssessor_Port")
+ endpointInterface="com.example.loan_approval.wsdl.RiskAssessmentPT",
+ targetNamespace = "http://example.com/loan-approval/wsdl/",
+ serviceName="riskAssessor",
+ portName="riskAssessor_Port")
public class RiskAssessmentPTImpl implements RiskAssessmentPT {
- public String check(
- String firstName,
- String name,
- BigInteger amount)
- throws ErrorMessage {
- System.out.println("\nRiskAssessmentPTImpl");
- System.out.println("*************************************************");
- System.out.println("firstName Parameter: " + firstName );
- System.out.println("name Parameter: " + name );
- System.out.println("amount Parameter: " + amount );
- System.out.println("*************************************************");
- System.out.println("\n");
-
- if (amount.intValue() <= 10000)
- return "low";
- else
- return "high";
- }
-
+ public String check(
+ String firstName,
+ String name,
+ BigInteger amount)
+ throws ErrorMessage {
+ System.out.println("\nRiskAssessmentPTImpl");
+ System.out.println("*************************************************");
+ System.out.println("firstName Parameter: " + firstName );
+ System.out.println("name Parameter: " + name );
+ System.out.println("amount Parameter: " + amount );
+ System.out.println("*************************************************");
+ System.out.println("\n");
+
+ if (amount.intValue() <= 10000)
+ return "low";
+ else
+ return "high";
+ }
+
}
Modified:
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java
===================================================================
---
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/LoanApprovalPTImpl.java 2010-02-12
15:54:16 UTC (rev 496)
@@ -10,7 +10,7 @@
@WebService(targetNamespace = "http://example.com/loan-approval/wsdl/",
-endpointInterface="com.example.loan_approval.wsdl.LoanApprovalPT",
portName="loanApprover_Port")
+endpointInterface="com.example.loan_approval.wsdl.LoanApprovalPT",
serviceName="loanApprover", portName="loanApprover_Port")
public class LoanApprovalPTImpl implements LoanApprovalPT {
public String approve(String firstName, String name,
Modified:
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java
===================================================================
---
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java 2010-02-11
11:27:57 UTC (rev 495)
+++
trunk/samples/quickstart/loan_approval/war/src/com/example/loan_approval/wsdl/RiskAssessmentPTImpl.java 2010-02-12
15:54:16 UTC (rev 496)
@@ -6,7 +6,8 @@
@WebService(
endpointInterface="com.example.loan_approval.wsdl.RiskAssessmentPT",
- targetNamespace = "http://example.com/loan-approval/wsdl/",
+ targetNamespace = "http://example.com/loan-approval/wsdl/",
+ serviceName="riskAssessor",
portName="riskAssessor_Port")
public class RiskAssessmentPTImpl implements RiskAssessmentPT {