[JBossWS] - Problems with german 'Umlaut'
by Ulf Wiegmann
Hallo,
I'm working for a SOA architectur project and I'm implementing JAX-WS 2.0 web services in the Contract-First way under JBoss 4.2.2.GA .
The service is implemented by an EJB3.0 SLSB, the client is an EJB3.0 SFSB, both runnung in the same container.
The WS-specific java classes will be generated by JBoss 4.2.2 tool wsconsume from the wsdl file for both sites
- service and client.
The problem is, that the UTF-8 decode/encode process doesn't work correctly for german 'umlaut' contained in a string, means that string parameters still contain the UTF-8 representation of an 'umlaut' after transfered to the java target string (in the same wrong way they will be displayed on this page: p.e. Müller , Schöler, Käse) ...
In the wsdl file I specified
<?xml version="1.0" encoding="UTF-8"?>
and
<binding ...>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
...
soap:body use="literal"
...
But when I use the Eclipse Web Service Explorer instead of the JAX WS 2.0 generated Java client, then at least in the client-server direction all works correctly for the search arguments, meanwhile the search results still contain the UTF-8 representations
What happened?
Ulf
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119696#4119696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119696
18 years, 3 months
[JBossWS] - Re: Writing a client - no examples for BindingProvider based
by mjhammel
"jeff norton" wrote :
| What is your classpath? And what old jars did you need to remove? I have a similar problem getting a client to connect to a web service that has basic authentication enabled. On the service.create(wsdlURL, QName) call I get (my client worked fine before I enabled basic authentication):
|
| | org.jboss.ws.metadata.wsdl.WSDLException: Cannot parse wsdlLocation: http://localhost:8080/foo?wsdl
| |
|
To compile the client, my classpath includes the source to the client, the classes generated by wsconsume and the following:
<path id="client.wsconsume.classpath">
| <fileset dir="${jboss.lib.dir}/endorsed">
| <include name="xercesImpl.jar"/>
| </fileset>
| <fileset dir="${jboss.client.lib.dir}">
| <include name="*.jar"/>
| <exclude name="jaxws-rt.jar"/>
| </fileset>
| <fileset dir="${java.lib.dir}">
| <include name="tools.jar"/>
| </fileset>
| </path>
where
jboss.lib.dir = ${jboss.home}/lib
| jboss.client.lib.dir = ${jboss.home}/client
| java.lib.dir = ${java.home}/lib
I got rid of axis and mail libraries which were being used in the old build. I'm not using Axis in the new project (at least not yet). I also no longer reference an in-build copy of jboss-j2ee.jar (though this is still referenced from the jboss.client.lib.dir) and javax.servlet.jar which were used in the old build (note that I inherited some of this so wasn't clear on why some of those were being used in the first place).
I ran into your problem with not finding the WSDL location after switching to Basic Authentication. In order to get around this I don't try to retrieve the WSDL file from the server during the client build. I have the server side build generate the WSDL file for me using wsprovide, then the client side build reads that file instead of trying to retrieve the WSDL via a URL. My wsconsume looks like this now:
<wsconsume
| fork="true"
| verbose="true"
| destdir="${build.client.classes.dir}"
| sourcedestdir="${build.client.dir}"
| keep="true"
| wsdl="${build.server.dir}/resources/SubscriberServicesService.wsdl">
| <!-- wsdl="http://127.0.0.1:8080/Crunch?wsdl"> -->
| </wsconsume>
My wsprovide looks like this:
<wsprovide
| fork="false"
| keep="true"
| destdir="${build.server.dir}/wsdl"
| resourcedestdir="${build.server.dir}/resources"
| sourcedestdir="${build.server.dir}/source"
| genwsdl="true"
| verbose="true"
| sei="com.cei.crunch.server.ws.SubscriberServices.SubscriberServices">
| <classpath>
| <pathelement path="${build.server.classes.dir}/server"/>
| </classpath>
| </wsprovide>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119695#4119695
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119695
18 years, 3 months
[JBossWS] - Re: Writing a client - no examples for BindingProvider based
by alessio.soldano@jboss.com
"mjhammel" wrote : "alessio.soldano(a)jboss.com" wrote : This is not your situation, you're not using the persistence context in a servlet, you need injection in a SLSB. And my previous post shows that it works.
|
| That may be, but then there is this discussion:
|
| http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107353
|
| In any case, I've done everything I think I need to do and it still doesn't work. I'd be happy for someone to show me what I've done wrong, but barring that I'd still have to say, in my case, it doesn't work.
|
Once again, you're not trying to use injection in a servlet, you need it in SLSB web service endpoint, don't you? The thread you linked talks about injection in servlets.
This said, going back to your problem, I would suggest you to start from the code I posted in this thread and modify it step by step according to your need.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119690#4119690
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119690
18 years, 3 months