Announcement Announcement Module
Collapse
No announcement yet.
WebServiceTransportException: Not Found [404] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebServiceTransportException: Not Found [404]

    Not Found [404]Not Found [404]org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]
    at org.springframework.ws.client.core.WebServiceTempl ate.handleError(WebServiceTemplate.java:627)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:551)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:502)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:457)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:403)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:388)
    at com.comcast.commsales.task.client.ClientPOX.main(C lientPOX.java:35)


    When I run my client, I see the above error.

    My client java code:

    try {
    ClientPOX client = new ClientPOX(new org.springframework.ws.pox.dom.DomPoxMessageFactor y());

    String sourceData = readFileAsString("C:\\tmp\\ttsNotificationInput.xm l");
    System.out.println(sourceData);
    StreamSource source = new StreamSource(new StringReader(sourceData));
    DOMResult result = new DOMResult();
    WebServiceTemplate template = client.getWebServiceTemplate();

    template.sendSourceAndReceiveToResult(URL,source,
    result);
    //template.
    System.out.println(result.toString());
    System.out.println("DONE");
    } catch (Throwable e) {
    String msg = e.getMessage()+getStackTrace(e);
    System.out.println(e.getMessage() + msg);
    }
    My: ..-servlet file

    <bean id="TTSNotificationSchema" class="org.springframework.xml.xsd.SimpleXsdSchema ">
    <property name="xsd" value="/WEB-INF/TTSNotification.xsd"/>
    </bean>


    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootQNameEndpointMapping">
    <property name="mappings">
    <props>
    <prop key="{http://comcast.com/commsales/task/domain}TTSNotification">TTSNotificationServiceEndp oint</prop>
    </props>
    </property>
    <property name="interceptors">
    <bean class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor"/>
    </property>
    </bean>


    <bean class="org.springframework.ws.server.endpoint.adap ter.MarshallingMethodEndpointAdapter">
    <constructor-arg ref="marshallerTTS"/>
    </bean>



    <bean id="TTSNotificationServiceEndpoint" class="com.comcast.commsales.task.services.ws.TTSN otificationServiceEndpoint">
    <property name="marshaller" ref="marshallerTTS" />
    <property name="unmarshaller" ref="unmarshallerTTS" />
    </bean>

    <bean id="marshallerTTS" class="org.springframework.oxm.jibx.JibxMarshaller ">
    <property name="targetClass"
    value="com.comcast.commsales.task.domain.TTSNotifi cation" />
    <property name="bindingName" value="binding" />
    </bean>

    <bean id="unmarshallerTTS" class="org.springframework.oxm.jibx.JibxMarshaller ">
    <property name="targetClass"
    value="com.comcast.commsales.task.domain.TTSNotifi cation" />
    <property name="bindingName" value="binding" />
    </bean>

    <bean id="TTSNotification" class="org.springframework.ws.wsdl.wsdl11.DefaultW sdl11Definition">
    <property name="schema" ref="TTSNotificationSchema"/>
    <property name="portTypeName" value="TaskAutomation"/>
    <!-- we use a relative uri that will be transformed by spring-ws dep-->
    <property name="locationUri" value="http://localhost:7001/web/notificationService"/>
    <property name="targetNamespace" value="http://comcast.com/commsales/task/domain"/>
    </bean>

    My input is a plain xml document

    <?xml version="1.0" encoding="UTF-8"?>
    <TTSNotification xmlns:tts="http://comcast.com/commsales/task/domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://comcast.com/commsales/task/domain TTSNotification.xsd">
    <appType>TTS</appType>
    <appName>ttsuser1</appName>
    <appPassword>ttsuser1#</appPassword>
    <key>
    <procedureName>WP000005667</procedureName>
    <procedureStep>10</procedureStep>
    <procedureStatus>2</procedureStatus>
    </key>
    <attribute>
    <name>CM Number</name>
    <value>1234</value>
    </attribute>
    <attribute>
    <name>CM Number</name>
    <value>1234</value>
    </attribute>
    <attribute>
    <name>CM Create Date</name>
    <value>12/20/2000</value>
    </attribute>
    <attribute>
    <name>CM Status</name>
    <value>Completed</value>
    </attribute>
    <lead>1234567</lead>
    <exception>
    <message>message</message>
    <lead>lead</lead>
    </exception>
    </TTSNotification>

    My xsd

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://comcast.com/commsales/task/domain" elementFormDefault="qualified" targetNamespace="http://comcast.com/commsales/task/domain">
    <xs:element type="tns:TTSNotification" name="TTSNotification"/>
    <xs:complexType name="TTSNotification">
    <xs:sequence>
    <xs:element type="xs:string" name="appType" minOccurs="0"/>
    <xs:element type="xs:string" name="appName" minOccurs="0"/>
    <xs:element type="xs:string" name="appPassword" minOccurs="0"/>
    <xs:element name="key" minOccurs="0">
    <xs:complexType>
    <xs:sequence>
    <xs:element type="xs:string" name="procedureName" minOccurs="0"/>
    <xs:element type="xs:string" name="procedureStep" minOccurs="0"/>
    <xs:element type="xs:string" name="procedureStatus" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="attribute" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType>
    <xs:sequence>
    <xs:element type="xs:string" name="name" minOccurs="0"/>
    <xs:element type="xs:string" name="value" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element type="xs:string" name="lead" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="exception" minOccurs="0">
    <xs:complexType>
    <xs:sequence>
    <xs:element type="xs:string" name="message" minOccurs="0"/>
    <xs:element type="xs:string" name="lead" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>


    Also,

    I want a XML document sent to the service, and the return I want the same XML document back. So, I have the XSD dfined with just one high level node of TTSNotification. I have no operaitons defined. The Soap UI does seem to work without operations. The test client that I wrote using webServiceTemplate is throwing this 404 error. I need to get this to work ASAP.

    I am using spring-ws1.5.8, dev in eclipse, deploy on weblogic.
    ganesh


Working...
X