[jboss-user] [JBossWS] - Strange - Entry Point not receive WS Message data
ronari2
do-not-reply at jboss.com
Mon Aug 20 03:22:54 EDT 2007
All,
I am using JBoss 4.2.1 with JBOSSWS 2.0.1
I have created a web service that uses a provided WSDL, when I send the WS request there are no errors on JBoss however my web service entry point does not receive in the IN parameter any data of the request (the object value is null), however, the data that I set for the response object does return in the return message.
My WSDL is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="LoginService" targetNamespace="http://model.login.ep.ws.asbl.zoomix.com/" xmlns:tns="http://model.login.ep.ws.asbl.zoomix.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<xsd:schema targetNamespace="http://model.login.ep.ws.asbl.zoomix.com/" version="1.0" xmlns:tns="http://model.login.ep.ws.asbl.zoomix.com/" xmlns:tns2="http://gen.model.infra.zoomix.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:version="2.0" jaxb:extensionBindingPrefixes="xjc">
<xs:import namespace="http://gen.model.infra.zoomix.com/" schemaLocation="./GeneralTypes.xsd"/>
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings>
<xjc:serializable />
</jaxb:globalBindings>
</xs:appinfo>
</xs:annotation>
<xsd:element name="message">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="request" type="tns:requestType" />
<xsd:element name="response" type="tns:responseType" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="requestType">
<xsd:sequence>
<xsd:element name="data" type="tns:loginType" />
</xsd:sequence>
<xsd:attribute name="operation" type="tns2:operationType" use="required" />
</xsd:complexType>
<xsd:complexType name="loginType">
<xsd:sequence>
<xsd:element name="password" type="tns:passwordType" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="responseType">
<xsd:sequence>
<xsd:element name="data" type="tns:loginSuccessType" />
</xsd:sequence>
<xsd:attribute name="status" type="tns2:statusType" use="required" />
<xsd:attribute name="category" type="tns2:categoryType" use="optional" />
<xsd:attribute name="msgId" type="tns:buff50" use="required" />
<xsd:attribute name="msg" type="tns:buff255" use="required" />
<xsd:attribute name="uid" type="tns:buff50" use="required" />
</xsd:complexType>
<xsd:complexType name="loginSuccessType">
<xsd:sequence>
<xsd:element name="firstName" type="tns:buff255" minOccurs="1" />
<xsd:element name="lastName" type="tns:buff255" minOccurs="1" />
<xsd:element name="status" type="xsd:int" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="passwordType">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
<xsd:simpleType name="statusType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OK" />
<xsd:enumeration value="ERR" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="categoryType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="INFRA" />
<xsd:enumeration value="BL" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="buff50">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="buff255">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1" />
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="operationType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LOGIN" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<soap:operation soapAction=""/>
<soap:body use="literal"/>
<soap:body use="literal"/>
<soap:address location="http://127.0.0.1:8081/ws/wslogin"/>
My Web service Entry point is:
package com.zoomix.asbl.ws.ep.login;
import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.Holder;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import com.zoomix.as.connector.Connector;
import com.zoomix.as.context.imp.MasterContext;
import com.zoomix.asbl.ws.ep.login.model.LoginSuccessType;
import com.zoomix.asbl.ws.ep.login.model.RequestType;
import com.zoomix.asbl.ws.ep.login.model.ResponseType;
import com.zoomix.infra.log.ZLogger;
/**
* The Login web service Entry Point
*
*/
@WebService(wsdlLocation = "WEB-INF/ws/login/LoginG.wsdl", name = "Login", targetNamespace = "http://model.login.ep.ws.asbl.zoomix.com/")
public class LoginEP {
@WebMethod
@RequestWrapper(localName = "message", targetNamespace = "http://model.login.ep.ws.asbl.zoomix.com/", className = "com.zoomix.asbl.ws.ep.login.model.Message")
@ResponseWrapper(localName = "message", targetNamespace = "http://model.login.ep.ws.asbl.zoomix.com/", className = "com.zoomix.asbl.ws.ep.login.model.Message")
public void message (
@WebParam(name = "request", targetNamespace = "", mode = WebParam.Mode.INOUT)
Holder request,
@WebParam(name = "response", targetNamespace = "", mode = WebParam.Mode.INOUT)
Holder response) {
logger.debug("LoginEP::message() --> IN");
// THE request.value object I receive is null !!!
// the data I set below DO return in the WS response
ResponseType responseType = new ResponseType();
LoginSuccessType s = new LoginSuccessType();
s.setFirstName("FIRST");
s.setLastName("LAST");
s.setStatus(1);
responseType.setData(s);
response.value = responseType;
}
// logger
private static ZLogger logger = ZLogger.getZLogger(LoginEP.class.getName());
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075659#4075659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075659
More information about the jboss-user
mailing list