[JBossWS] - How to provide soapAction from dispatch call?
by oskar.carlstedt
Hello!
I've tried a to fix this for some hours know. Maybe I'm doing something completely wrong here.
I have a web service client that that is using the dispatch technique. I will use the dispatch because I'm using xmlbeans to bind my data. Here is a little code snippet of what I'm trying to do:
| // names
| String targetNamespace = "http://test/test-service";
| QName serviceQName = new QName(targetNamespace, "TestService");
| QName portQName = new QName(targetNamespace, "TestServiceSoap11Port");
| URL wsdlURL = new URL("http://lpt-osca:8080/service-testservice-jaxws-web?wsdl");
|
| // create service
| Service service = Service.create(serviceQName);
| service.addPort(portQName, SOAPBinding.SOAP11HTTP_BINDING, wsdlURL.toExternalForm());
| Dispatch<StreamSource> dispatch = service.createDispatch(portQName, StreamSource.class, Mode.PAYLOAD);
|
| // set SOAPAction
| dispatch.getRequestContext().put(BindingProvider.SOAPACTION_USE_PROPERTY, true);
| dispatch.getRequestContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, "uri:placeBuyOrder");
|
| // create xml options for pretty print
| XmlOptions xmlOptions = new XmlOptions();
| xmlOptions.setSavePrettyPrint();
|
| // create request
| TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();
| ...
|
|
| // print request
| System.out.println("REQUEST");
| testRequestDocument.save(System.out, xmlOptions);
| System.out.println();
|
| // save request in a stream
| ByteArrayOutputStream requestByteArrayOutputStream = new ByteArrayOutputStream();
| testRequestDocument.save(requestByteArrayOutputStream);
|
| // create a new stream source
| StreamSource requestStreamSource = new StreamSource(new ByteArrayInputStream(requestByteArrayOutputStream.toByteArray()));
|
| // invoke
| StreamSource responseSource = dispatch.invoke(requestStreamSource);
|
| // parse result
| XmlObject xmlObject = XmlObject.Factory.parse(responseSource.getInputStream());
|
| // print response
| System.out.println("RESPONSE");
| xmlObject.save(System.out, xmlOptions);
|
When doing this. it seems like the soap action attribute is not sent to the server, at least not in the http headers. So, my question is: Is the soapAction sent to the sever? If so, where can I find it in the messageContext?
My service is a web service endpoint provider implementation like
| @Stateless
| @WebServiceProvider(
| serviceName = "TestService",
| portName = "TestServiceSoap11Port",
| targetNamespace = "http://test/test-service",
| wsdlLocation = "WEB-INF/wsdl/test-service.wsdl")
| @ServiceMode(value = Service.Mode.PAYLOAD)
| public class FundOrderEndpointProvider implements Provider<Source> {
|
| ...
|
| }
|
|
I will look for the soap action http header to decide what method to invoke in another stateless session bean.
Can anyone help me we this?
Best Regards
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037613#4037613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037613
19 years
[JBoss jBPM] - Process files not uploaded
by chip_schoch
In jbpm-3.1.3 I uploaded the process zip and all the process files were uploaded. I could verify that they were there by querying jbpm_byteblock. I upgraded to 3.2 and created new tables in a new mssql database using the new script. I then uploaded the exact same process zip :
ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream (zis);
| jbpmContext.deployProcessDefinition (processDefinition);
Now I cannot retrieve that process jpeg and there are no entries in the jbpm_byteblock table. I see that there is aFileDefinition.hbm.xml file that references a jbpm_processfiles table, but that table was not created in the script. Anybody know whats up with this?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037611#4037611
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037611
19 years
[Clustering/JBoss] - Serious production problems
by Marlig
Hi,
we are using JBoss 4.0.4 under Solaris 5.8 and JDK 1.5 in production. JBoss is fronted by Apache (2.0.43) with mod_jk (1.2.19) for load-balancing the web-frontend. We have two JBoss cluster nodes running.
Every couple of days (3-5 days) we run into serious problems which ultimately require the restart of the whole JBoss cluster. The first sign is that the number of Apache processes increases rapidly (from around 30 to well over 200), and then we get an OutOfMemory error on one of the JBoss nodes. However, we are not sure here what is cause and what is effect.
But we see one behaviour where we believe it might be a part of the problem. We were able to recover some information while the server was having the OutOfMemory erros, and noticed that some threads seem to be stuck while doing some sort of socket access.
The Java stack dump shows entries like this:
| Thread t@125: (state = IN_NATIVE)
| Error occurred during stack walking:
|
(nothing after the colon)
for which jstack -m shows this:
| ----------------- t@125 -----------------
| 0xff29eccc _read + 0x8
| 0xfacdc1a4 Java_java_net_SocketInputStream_socketRead0 + 0x1fc
|
(just that)
Has anyone of you seen this kind of problem before? Or maybe knows that it is the normal behaviour and definitely not the source of our OutOfMemorys?
Btw, we also noticed that during the OutOfMemory situation, the memory consumed by byte[]-arrays is much higher (magnitude of 10) than during normal operation.
Maybe any other idea on the problem?
Thanks a lot
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037606#4037606
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037606
19 years
[EJB/JBoss] - ClassLoading problems, JBoss ClassLoading Strategy might be
by cd_eat
If ur EJB extends some class such as Spring AbstractXXXEJB, and this very AbstractXXXEJB happens stored in the WEB-INF/LIB DIR of a war file.When try to deploy ur EJB, u'll get a "EJB spec violation... Section 22.2"problem(try search it on google).The reason is that JBoss couldn't find the father class for ur EJB! that means jars stored in WEB-INF/LIB DIR can only be shared in the war project, not on the outside.
Trying to fix this problem, I modified following file: server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml and active the following propety but that didn't work. Does anybody meet this problem and know how to config the JBoss classloading strategies?
<!-- A flag indicating if the JBoss Loader should be used. This loader
| uses a unified class loader as the class loader rather than the tomcat
| specific class loader.
| The default is false to ensure that wars have isolated class loading
| for duplicate jars and jsp files.
| -->
| <attribute name="UseJBossWebLoader">false</attribute
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037601#4037601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037601
19 years