[JBossWS] - JBoss 4.0.5 and JBoss 4.2 CR1 plus JBossWS 1.2 - Does it rea
by ltenmatay
Here is what I did, I followed the guide in creating java classes from wsdl. I used the wsconsume tool.
The xml to be sent has a body something like this, I just made up the element names, but the structure is the same.
| <requestsender>
| <stype></stype>
| <content>
| <name></name>
| <age></age>
| <listaddress>
| <listname></listname
| </listaddress>
| </content>
| </requestsender>
|
| <responsesender>
| <Status></Status>
| </responsesender>
|
Everything worked fine during deployment. I also had an existing client which works in the actual web service environment. What I'm doing is trying to replicate that environment. The client communicates by creating and sending an xml, and not by using a port. The client uses castor, but it should not matter since an xml is created and sent. I should not create a new client as I need to make it work with the existing client module.
There are 3 problems. The first is ignorable but I still want to put it here.
1. There is no wsrunclient in JBoss 4.0.5, so the guide does not work for JBoss 4.0.5.
2. There is no problem with communication, the xml is sent to JBoss. Problem is that all contents of RequestSender object is null. It always does not have a value, it seems something is wrong with the unbinding or deserializing of the xml.
3. I can return a response to the client, problem is in the case of the returned xml. For example, "Status" is returned as lowercase "status", which raises an error in the client by castor during unbinding. It should not be in lowercase.
Did the guide miss something else? Take note that the generated ObjectFactory does not contain much, just a simple new XXX class. But I think this is not related right?
Can you advise on what to do? Does JBossWS 1.2 really work? or this is a bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027105#4027105
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027105
17 years, 9 months
[JBossWS] - How to make XML processeing by myself using contract first (
by oskar.carlstedt
Hi!!
After reading a lot of posts I cannot find anything that really helps me here. So, time for a question.
I have my WSDL file that uses types/schema/import... to import new schema types. Now I want to create a session bean (or whatever else) that can handle this request using xml beans as data binding. I want to use xml beans because I have a lot of other xml processing in my code using xml beans, therefore xml beans is the most correct choice in this solution.
As I can see it is very hard to write a mapping file using xml beans directly. Is it possible at all? A more practical way to go is to use a method SOAPElements, e.g. a method like:
public SOAPElement doSomething(SOAPELement theRequest) {
MyXmlObject myXmlObj = SomeUtils.convertToMyXmlObject(thRequest);
....
MyXmlResponseObject myXmlResponseObj = ...
return SomUtils.convertToSoapElement(myXmlResponseObj);
}
Is this the way to go? Have anyone of you out here done this using the new JbossWS implementation (not the old axis based ws4ee). I can't proceed using trial and error here, it will take too long. I tried the following:
I tried to put javax.xml.soap.SOAPElement as java types in the jaxrpc mapping file. In Jboss4.0.5GA with JBossWS 1.2.0GA all request where mapped corectly, but it is impossible to send responses. The log says cannot find parameter ... for type javax.xml.soap.SOAPELement.
Then I tried to remove all sub types (only top messages where left types typed) left mapped. Then I couldn't deploy my service. A lot of missing type mapping errors occurred in the log..
Thanks
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027082#4027082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027082
17 years, 9 months
[JBossWS] - How do I use MIME types other than text/xml
by lbrackman
I am trying to use MTOM to send attachments. I am using wstools to generate all components from an endpoint. I successfully run a test with a text/xml type but I cannot use any others types including text/plain or application/octect. The following is my endpoint and config file:
endpoint -
public interface FileXferEndpoint extends Remote {
public String sendPart(Long txId, Integer partNum, Long size, DataHandler data) throws RemoteException;
}
config file -
<java-wsdl>
<namespaces target-namespace="http://fileXfer.ws.synoran.com/"
type-namespace="http://fileXfer.ws.synoran.com/types"/>
<webservices servlet-link="FileXferWS"/>
</java-wsdl>
Environment:
JBoss 4.0.5.GA
Java 1.5(5.0)
JbossWS 2.0
I always get the following error:
failed; nested exception is:
[java] org.jboss.ws.core.jaxrpc.binding.BindingException: Mime type application/octet not allowed for parameter DataHandler_4 allowed types are [text/xml]
[java] at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:522)
[java] at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:273)
[java] at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
[java] at $Proxy0.sendPart(Unknown Source)
I would like to be able to send */* types. How is this done? Any samples would be appreciated. Also, where can I get the schema for the configuration file and a better explanation on how to use wstools?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026729#4026729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026729
17 years, 9 months