FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Testing composite application

 
Post new topic   Reply to topic    NetBeans Forums -> SOA Users
View previous topic :: View next topic  
Author Message
pjmorce



Joined: 17 Aug 2009
Posts: 1

PostPosted: Mon Aug 17, 2009 7:24 am    Post subject: Testing composite application Reply with quote

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
View user's profile Send private message
doviche



Joined: 16 Oct 2009
Posts: 2

PostPosted: Fri Oct 16, 2009 12:59 pm    Post subject: Testing Composite Application Reply with quote

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
View user's profile Send private message MSN Messenger
bako



Joined: 11 Sep 2009
Posts: 10
Location: Italy

PostPosted: Mon Oct 26, 2009 1:53 pm    Post subject: Re: Testing composite application Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> SOA Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB