- This topic has 8 replies, 2 voices, and was last updated 17 years, 7 months ago by mario123.
-
AuthorPosts
-
mario123ParticipantHi. I have Myeclipse Version: 5.1.1 GA and Jboss 4.0.5
My wsdl is:
<?xml version=”1.0″ encoding=”UTF-8″?>
<wsdl:definitions xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/”
xmlns:tns=”http://ws.biznes/TestWS/”
xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema” name=”TestWS”
targetNamespace=”http://ws.biznes/TestWS/”>
<wsdl:types>
<xsd:schema targetNamespace=”http://ws.biznes/TestWS/”>
<xsd:element name=”Dana”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”in” type=”xsd:string” />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”Odpowiedz”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”out” type=”xsd:string” />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name=”GetTextRequest”>
<wsdl:part element=”tns:Dana” name=”parameters” />
</wsdl:message>
<wsdl:message name=”GetTextResponse”>
<wsdl:part element=”tns:Odpowiedz” name=”parameters” />
</wsdl:message>
<wsdl:portType name=”TestWS”>
<wsdl:operation name=”GetText”>
<wsdl:input message=”tns:GetTextRequest” />
<wsdl:output message=”tns:GetTextResponse” />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name=”TestWSSOAP” type=”tns:TestWS”>
<soap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http” />
<wsdl:operation name=”GetText”>
<soap:operation soapAction=”http://ws.biznes/TestWS/GetText” />
<wsdl:input>
<soap:body use=”literal” />
</wsdl:input>
<wsdl:output>
<soap:body use=”literal” />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=”TestWS”>
<wsdl:port binding=”tns:TestWSSOAP” name=”TestWSSOAP”>
<soap:address location=”http://www.example.org/” />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>Using Myeclipse generator I generated an WS ( I also added JSF , but I dont know why, without it I cannot deploy)
During deployment I got the following message :Error creating bean with name ‘org.codehaus.xfire.spring.ServiceBean’
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type
and long traceAny suggestion?
best regards
Boguslaw Fries
RussMemberMario123:
I am not sure what your problem is but I can offer you some suggestions.
1. Your address element within the Service section of the WSDL, it this correct? What is happening on JBoss is it replaces this line when the application is deployed…..Getting this and placing this in your WSDL will aid your debug efforts.
2. Check your services.xml file to be sure you have the style and use combination set right.<style>wrapped</style> <use>literal</use>
3. If at all possible, move to ME5.5M1 or ME5.5M2 (9 APR). This version has some good tools for Web Services and it will aid you greatly in identifying issues with your WSDL. Also, XFire 1.2.4 (ME5.5M1) has fixed some issues which exist in XFire 1.2.1 (ME 5.1.1)
Hope that helps you some…….
Russ
mario123ParticipantI investigated my problem longer. First of all I cannot use ME5.5M1 with jBoss 4.xx because jBoss does not implement axis, they are using own ws technology, which is not supported ( ??? ) by ME5.5M1. second problem jBoss 4.xx propably supports java 1.4 only but not 1.5 🙁 But I need 1.5 from nany reason ( f. e. Jaxb 2.0 )
Any new suggestions?
best regards
Boguslaw
RussMemberMario123:
I can tell you how I have my environment setup.
a. I am using JDK 1.5
b. I am using ME5.5M1
c. I am using JBoss4.0.5
d. I am using XFire 1.2.4What is the great about XFire is it is server agnostic. The reason for this is everything is wrapped up in a jar file and XFire uses a Servlet to capture incoming traffic and route it to the XFire web services module.
If you are LOCKED into using the codebase generated by Axis, then I would suggest you look into ANT for building the classes you need. This way you can build/test/deploy locally without much difficulty.
I hope this helps you.
Russ
mario123ParticipantThanks, now is slight better. I use now
JDK 1.5
ME5.5M1
JBoss4.0.5
XFire 1.2.4
but generated client returns: null
and
message:
2007-04-10 11:48:46 org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabledI implement service simply:
public class TestWSImpl implements TestWS {public String getText(String GetTextRequest)
{
return GetTextRequest + ” ready!!”;
}}
any idea?
Best regards
Boguslaw Fries
mario123ParticipantI found something new:
My generated by Myeclipse client has the following code:
Endpoint TestWSLocalEndpointEP = service0.addEndpoint(new QName(
“http://biznes.ws/TestWS/”, “TestWSLocalEndpoint”), new QName(
“http://biznes.ws/TestWS/”, “TestWSLocalBinding”),
“xfire.local://TestWS”);
endpoints.put(new QName(“http://biznes.ws/TestWS/”,
“TestWSLocalEndpoint”), TestWSLocalEndpointEP);
Endpoint TestWSSOAPEP = service0.addEndpoint(new QName(
“http://biznes.ws/TestWS/”, “TestWSSOAP”), new QName(
“http://biznes.ws/TestWS/”, “TestWSSOAP”),
“http://localhost:8080/TestWS/services/TestWS”); <———————— this I changed ( formely was http://localhost:8080/TestWS
endpoints.put(new QName(“http://biznes.ws/TestWS/”, “TestWSSOAP”),
TestWSSOAPEP);Now I get such error:
Parameter {http://biznes.ws/TestWS/}GetText does not exist!What I do wrong?
mario123ParticipantSory, extra information . I changed my sdl : now is the following:
<?xml version=”1.0″ encoding=”UTF-8″?>
<wsdl:definitions xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/”
xmlns:tns=”http://biznes.ws/TestWS/”
xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema” name=”TestWS”
targetNamespace=”http://biznes.ws/TestWS/”>
<wsdl:message name=”GetTextRequest”>
<wsdl:part name=”GetTextRequest” type=”xsd:string” />
</wsdl:message>
<wsdl:message name=”GetTextResponse”>
<wsdl:part name=”GetTextResponse” type=”xsd:string” />
</wsdl:message>
<wsdl:portType name=”TestWS”>
<wsdl:operation name=”GetText”>
<wsdl:input message=”tns:GetTextRequest” />
<wsdl:output message=”tns:GetTextResponse” />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name=”TestWSSOAP” type=”tns:TestWS”>
<soap:binding style=”rpc”
transport=”http://schemas.xmlsoap.org/soap/http” />
<wsdl:operation name=”GetText”>
<soap:operation
soapAction=”http://biznes.ws/TestWS/GetText” />
<wsdl:input>
<soap:body namespace=”http://biznes.ws/TestWS/”
use=”literal” />
</wsdl:input>
<wsdl:output>
<soap:body namespace=”http://biznes.ws/TestWS/”
use=”literal” />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=”TestWS”>
<wsdl:port binding=”tns:TestWSSOAP” name=”TestWSSOAP”>
<soap:address location=”http://localhost:8080/TestWS” />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
RussMemberMario123:
Okay, sounds like you got it running……. Great JOB! You are correct in your assumption… The issue was your WSDL.
Russ
mario123ParticipantYes:) I did many “not important errors ” 🙂 But now it is running.
Btw , why it is important to use <style>wrapped</style> ?
Best regards
Boguslaw Fries -
AuthorPosts