0 Replies Latest reply on May 26, 2011 11:07 AM by G K

    Create a Simple Webservice - but Failed

    G K Newbie

      Hello Community,

       

      i am started to create a simple webservice and i wanted to send a JavaBean but when I want to connect with my client I get this Exception:

       

       

      org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://controller.coreservices.openflow.org/}account
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:264)
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataRpc(JAXRPCMetaDataBuilder.java:564)
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:208)
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:221)
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
          at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
          at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:109)
          at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:155)
          at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:126)
          at org.openflow.api.general.ConnectionFactory.setConfiguration(ConnectionFactory.java:28)
          at org.openflow.api.Impl.OpenFlowFactoryImpl.getServer(OpenFlowFactoryImpl.java:30)
          at Main.main(Main.java:30)
      Exception in thread "main" java.lang.NullPointerException
          at org.openflow.api.Impl.ServerImpl.login(ServerImpl.java:20)
          at Main.main(Main.java:31)
      

       

      What kind of mapping is it? How can i map it?

       

      Here is my WSDL:

       

       

      <definitions name="ControllerServiceService" targetNamespace="http://controller.coreservices.openflow.org/"><types><xs:schema targetNamespace="http://controller.coreservices.openflow.org/" version="1.0"><xs:complexType name="account"><xs:sequence><xs:element minOccurs="0" name="password" type="xs:string"/><xs:element minOccurs="0" name="userid" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType name="session"><xs:sequence><xs:element minOccurs="0" name="sessionId" type="xs:string"/><xs:element minOccurs="0" name="userId" type="xs:string"/><xs:element minOccurs="0" name="userRole" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType name="role"><xs:sequence><xs:element minOccurs="0" name="roleId" type="xs:string"/><xs:element minOccurs="0" name="roleName" type="xs:string"/><xs:element minOccurs="0" name="userId" type="xs:string"/></xs:sequence></xs:complexType><xs:complexType final="#all" name="roleArray"><xs:sequence><xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="tns:role"/></xs:sequence></xs:complexType></xs:schema><xs:schema targetNamespace="http://jaxb.dev.java.net/array" version="1.0"><xs:complexType final="#all" name="stringArray"><xs:sequence><xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:schema></types><message name="IController_addAccount"><part name="arg0" type="xsd:string"/><part name="arg1" type="xsd:string"/></message><message name="IController_createSession"><part name="arg0" type="tns:account"/></message><message name="IController_getRoles"/><message name="IController_updateSession"><part name="arg0" type="tns:session"/></message><message name="IController_loginResponse"><part name="return" type="tns:account"/></message><message name="IController_deleteAccountResponse"/><message name="IController_deleteAccount"><part name="arg0" type="xsd:string"/></message><message name="IController_updateSessionResponse"/><message name="IController_createRoleResponse"/><message name="IController_deleteSession"><part name="arg0" type="tns:session"/></message><message name="IController_createRole"><part name="arg0" type="xsd:string"/></message><message name="IController_getRole"><part name="arg0" type="xsd:string"/></message><message name="IController_getRoleResponse"><part name="return" type="tns:role"/></message><message name="IController_listUsers"/><message name="IController_logout"><part name="arg0" type="tns:session"/></message><message name="IController_login"><part name="arg0" type="xsd:string"/><part name="arg1" type="xsd:string"/></message><message name="IController_addAccountResponse"/><message name="IController_deleteSessionResponse"/><message name="IController_createSessionResponse"><part name="return" type="tns:session"/></message><message name="IController_getRolesResponse"><part name="return" type="tns:roleArray"/></message><message name="IController_listUsersResponse"><part name="return" type="ns1:stringArray"/></message><message name="IController_logoutResponse"/><portType name="IController"><operation name="addAccount" parameterOrder="arg0 arg1"><input message="tns:IController_addAccount"/><output message="tns:IController_addAccountResponse"/></operation><operation name="createRole" parameterOrder="arg0"><input message="tns:IController_createRole"/><output message="tns:IController_createRoleResponse"/></operation><operation name="createSession" parameterOrder="arg0"><input message="tns:IController_createSession"/><output message="tns:IController_createSessionResponse"/></operation><operation name="deleteAccount" parameterOrder="arg0"><input message="tns:IController_deleteAccount"/><output message="tns:IController_deleteAccountResponse"/></operation><operation name="deleteSession" parameterOrder="arg0"><input message="tns:IController_deleteSession"/><output message="tns:IController_deleteSessionResponse"/></operation><operation name="getRole" parameterOrder="arg0"><input message="tns:IController_getRole"/><output message="tns:IController_getRoleResponse"/></operation><operation name="getRoles"><input message="tns:IController_getRoles"/><output message="tns:IController_getRolesResponse"/></operation><operation name="listUsers"><input message="tns:IController_listUsers"/><output message="tns:IController_listUsersResponse"/></operation><operation name="login" parameterOrder="arg0 arg1"><input message="tns:IController_login"/><output message="tns:IController_loginResponse"/></operation><operation name="logout" parameterOrder="arg0"><input message="tns:IController_logout"/><output message="tns:IController_logoutResponse"/></operation><operation name="updateSession" parameterOrder="arg0"><input message="tns:IController_updateSession"/><output message="tns:IController_updateSessionResponse"/></operation></portType><binding name="IControllerBinding" type="tns:IController"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="addAccount"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="createRole"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="createSession"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="deleteAccount"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="deleteSession"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="getRole"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="getRoles"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="listUsers"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="login"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="logout"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation><operation name="updateSession"><soap:operation soapAction=""/><input><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></input><output><soap:body namespace="http://controller.coreservices.openflow.org/" use="literal"/></output></operation></binding><service name="ControllerServiceService"><port binding="tns:IControllerBinding" name="ControllerServicePort"><soap:address location="http://127.0.0.1:8080/AccountService/ControllerService"/></port></service></definitions>
      

       

      Best regards

       

      george