Mikhail Kuzmin created AXIS2-5381:
-------------------------------------

             Summary: wsdl2Java: operation location doesn't concatenate with 
address location (or with endpoint)
                 Key: AXIS2-5381
                 URL: https://issues.apache.org/jira/browse/AXIS2-5381
             Project: Axis2
          Issue Type: Bug
          Components: wsdl
    Affects Versions: 1.6.2
         Environment: Axis2 1.6.2 (wsdl2java)
VacalPassword.wsdl (from the VacalPassword WS Server - www.nuance.com) 

            Reporter: Mikhail Kuzmin


Hello, 

Using the wsdl2java utility we generate from the VocalPassword.wsdl (attached) 
the Java source code files (VocalPasswordServer.java, 
VocalPasswordServerCallbackHandler.java, VocalPasswordServerStub.java) which 
contains the code for binding to the VocalPassword web service, sending the 
request and receiving the response. But then we are trying to use these Java 
stubs to invoke request to the VocalPassword web service – we get the 
“exception org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found”


Root cause:

According to the Web Services Description Language (WSDL) speciation 
(http://www.w3.org/TR/wsdl)  part 4.5 http:operation, http:operation location 
is combined with the URI specified in the http:address element to form the full 
URI for the HTTP request.
Initial VocalPassword.wsdl includes
      <http:operation location="/StartSession" />
and
     <http:address 
location="http://localhost/VocalPassword/VocalPasswordServer.asmx"; />

But when we are trying to send the POST request to the VocalPassword web 
service, instead of the 

POST /VocalPassword/VocalPasswordServer.asmx/StartSession HTTP/1.1
Host: 192.168.108.119
Content-Type: application/x-www-form-urlencoded
Content-Length: length
configSetName=string

the following request

POST /StartSession HTTP/1.1
Host: 192.168.108.119
Content-Type: application/x-www-form-urlencoded
Content-Length: length
configSetName=string

is received by the VocalPassword ws server. 
i.e. “/VocalPassword/VocalPasswordServer.asmx” (http:address location) is 
missed in the POST request.

Here are our steps:

1) GenerateVocalPassword Java stubs using the VocalPassword.wsdl
wsdl2java -uri VocalPassword.wsdl -o . -p httppost -pn 
VocalPasswordServerHttpPost -uw -uon -u –Eosv

2) Compile created Java stubs by Ant
ant

This command will invoke JDK to compile created Java stubs. The compiled files 
will be packed into JAR file and placed to \build\lib\ subdirectory

3) Set VocalPassword operation name (in our case - StartSession) , pass to the 
VocalPasswordServerStub (VocalPasswordServerStub.java) constructor your 
endpoint (in our case - “http:// 
192.168.108.119/VocalPassword/VocalPasswordServer.asmx”) and send request to 
VocalPassword ws server.
!!! In your case, for problem reproducing use your own system with configured 
sniffer tool (e.g. Wireshark) instead of the VocalPassword ws server (i.e. 
configured ws server is not needed).  

Expected result:

POST /VocalPassword/VocalPasswordServer.asmx/StartSession HTTP/1.1
Host: 192.168.108.119
Content-Type: application/x-www-form-urlencoded
Content-Length: length
configSetName=string

is received by the ws server

Actual result:

POST /StartSession HTTP/1.1
Host: 192.168.108.119
Content-Type: application/x-www-form-urlencoded
Content-Length: length
configSetName=string

is received by the ws server and exception org.apache.axis2.AxisFault: 
Transport error: 404 Error: Not Found occurs.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to