| View previous topic :: View next topic |
| Author |
Message |
pjmorce
Joined: 17 Aug 2009 Posts: 1
|
Posted: Mon Aug 17, 2009 7:24 am Post subject: Testing composite application |
|
|
Hello
I have build successfully my BPEL Module and my composite application. I test it and everything was ok.
Now, I would like to build a java class to call test my composite application.
The XML input file for testing is not enought because I want to test the treatment of a Soap With Attachment Message (this is why the Java class would be used: to build a Soap With Attachment message and to call the composite application).
How can I do that? any example? Which URL must be called by this Java class suposing that my composite application is running on my local machine and is called "TestAttach"?
Thanks
Best regards |
|
| Back to top |
|
 |
doviche
Joined: 16 Oct 2009 Posts: 2
|
Posted: Fri Oct 16, 2009 12:59 pm Post subject: Testing Composite Application |
|
|
Hi mate,
Would you be so kind to let me know why:
When I try to test a composite application in netbeans, composed by ejb(webservice impl which works properly) and a bpel which is intended to orchestrate services on this webservice impl, the test I provided to the compositeapp fails raising the following exception:
Before I place the exception I would like to ask you something else:
When you provide the test to the composite app, do you use the wsdl from the casaPort(), or the wsdl from your bpel(PartnerLink) wired into the composite app or directly the one from your service such as my ejb-webservice(partnerlink) wired as well into the composited app???
Because when I use the wsdl from my wired ejb-webservice, the test works instead if I use the ones from the bpel or the composite app itself, it fails
com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:191)
at org.netbeans.modules.compapp.catd.util.Util.sendMessage(Util.java:365)
at org.netbeans.modules.compapp.catd.ConfiguredTest$ConcurrentTestSendOnlyRunnable.run(ConfiguredTest.java:1839)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
... 3 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:368)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 5 more
CAUSE:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
at org.netbeans.modules.compapp.catd.util.Util.sendMessage(Util.java:365)
at org.netbeans.modules.compapp.catd.ConfiguredTest$ConcurrentTestSendOnlyRunnable.run(ConfiguredTest.java:1839)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:368)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 5 more
CAUSE:
java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection.java:185)
at org.netbeans.modules.compapp.catd.util.Util.sendMessage(Util.java:365)
at org.netbeans.modules.compapp.catd.ConfiguredTest$ConcurrentTestSendOnlyRunnable.run(ConfiguredTest.java:1839)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Bad response: (404Not Found
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection.java:368)
at com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:214)
... 5 more
Test TestCase1\Concurrent.properties Failed. (Destination: http://localhost:8088/casaService1/casaPort1)
Details:
<Concurrent test thread 0> is Errored. Success rate 0/1
)
Many thanks in advance.
Douglas |
|
| Back to top |
|
 |
bako
Joined: 11 Sep 2009 Posts: 10 Location: Italy
|
Posted: Mon Oct 26, 2009 1:53 pm Post subject: Re: Testing composite application |
|
|
| pjmorce wrote: | Hello
I have build successfully my BPEL Module and my composite application. I test it and everything was ok.
Now, I would like to build a java class to call test my composite application.
The XML input file for testing is not enought because I want to test the treatment of a Soap With Attachment Message (this is why the Java class would be used: to build a Soap With Attachment message and to call the composite application).
How can I do that? any example? Which URL must be called by this Java class suposing that my composite application is running on my local machine and is called "TestAttach"?
Thanks
Best regards |
why u don't simply create a Stub of the bpel (the wsdl of the bpel) and call the method from there?
to create the wsdl is simply, u need only axis2 (or what do u use, not the war, the app that contians the wsdl2java command).
so, when u have axis2 on ur machine u can takes the wsdl of the bpel and products the stub.
to take the right wsdl looks int the wsdl of bpel and takes the information in the services part, probabily there exists a string like this:
<service name="BPELServiceService">
<port name="BPELServicePort" binding="tns:BPELServiceBinding">
<soap:address location="http://localhost:${HttpDefaultPort}/BPELServiceService/BPELServicePort"/>
</port>
</service>
u have to take the location http://localhost:${HttpDefaultPort}/BPELServiceService/BPELServicePort change the ${HttpDefaultPort} to the casa port (normally is 9080) and via console call this line
$AXIS2_HOME/bin/wsdl2java.sh -uri http://localhost:9080/BPELServiceService/BPELServicePort?wsdl
this download the file on ur pc and create a project
now u can simply type: ANT
and the projects is build.
in the build/lib u can found the stub and u can use this stub into a project (to use this jar u need the axis2lib into ur project). |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|