facebook

problem with ws deployment

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #268392 Reply

    mario123
    Participant

    Hi. 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/&#8221;
    xmlns:tns=”http://ws.biznes/TestWS/&#8221;
    xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/&#8221;
    xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; name=”TestWS”
    targetNamespace=”http://ws.biznes/TestWS/”&gt;
    <wsdl:types>
    <xsd:schema targetNamespace=”http://ws.biznes/TestWS/”&gt;
    <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&#8221; />
    <wsdl:operation name=”GetText”>
    <soap:operation soapAction=”http://ws.biznes/TestWS/GetText&#8221; />
    <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/&#8221; />
    </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 trace

    Any suggestion?
    best regards
    Boguslaw Fries

    #268413 Reply

    Russ
    Member

    Mario123:

    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

    #268489 Reply

    mario123
    Participant

    I 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

    #268517 Reply

    Russ
    Member

    Mario123:

    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.4

    What 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

    #268624 Reply

    mario123
    Participant

    Thanks, 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 disabled

    I implement service simply:
    public class TestWSImpl implements TestWS {

    public String getText(String GetTextRequest)
    {
    return GetTextRequest + ” ready!!”;
    }

    }
    any idea?
    Best regards
    Boguslaw Fries

    #268625 Reply

    mario123
    Participant

    I found something new:
    My generated by Myeclipse client has the following code:
    Endpoint TestWSLocalEndpointEP = service0.addEndpoint(new QName(
    http://biznes.ws/TestWS/&#8221;, “TestWSLocalEndpoint”), new QName(
    http://biznes.ws/TestWS/&#8221;, “TestWSLocalBinding”),
    “xfire.local://TestWS”);
    endpoints.put(new QName(“http://biznes.ws/TestWS/&#8221;,
    “TestWSLocalEndpoint”), TestWSLocalEndpointEP);
    Endpoint TestWSSOAPEP = service0.addEndpoint(new QName(
    http://biznes.ws/TestWS/&#8221;, “TestWSSOAP”), new QName(
    http://biznes.ws/TestWS/&#8221;, “TestWSSOAP”),
    http://localhost:8080/TestWS/services/TestWS&#8221;); <———————— this I changed ( formely was http://localhost:8080/TestWS
    endpoints.put(new QName(“http://biznes.ws/TestWS/&#8221;, “TestWSSOAP”),
    TestWSSOAPEP);

    Now I get such error:
    Parameter {http://biznes.ws/TestWS/}GetText does not exist!

    What I do wrong?

    #268626 Reply

    mario123
    Participant

    Sory, 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/&#8221;
    xmlns:tns=”http://biznes.ws/TestWS/&#8221;
    xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/&#8221;
    xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; name=”TestWS”
    targetNamespace=”http://biznes.ws/TestWS/”&gt;
    <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&#8221; />
    <wsdl:operation name=”GetText”>
    <soap:operation
    soapAction=”http://biznes.ws/TestWS/GetText&#8221; />
    <wsdl:input>
    <soap:body namespace=”http://biznes.ws/TestWS/&#8221;
    use=”literal” />
    </wsdl:input>
    <wsdl:output>
    <soap:body namespace=”http://biznes.ws/TestWS/&#8221;
    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&#8221; />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    #268643 Reply

    Russ
    Member

    Mario123:

    Okay, sounds like you got it running……. Great JOB! You are correct in your assumption… The issue was your WSDL.

    Russ

    #268677 Reply

    mario123
    Participant

    Yes:) 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

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: problem with ws deployment

You must be logged in to post in the forum log in