Hi, The generated @WebParam from JAX-WS is correct. You don't need to add the prefix as the targetNamespace will qualify the element name.
@WebParam(name = "Login", targetNamespace = "http://linedata.com/WS/Login/parts/1.0", partName = "parameters") It seems that the following xsd:import is not resolved correctly for some reason: <xsd:import namespace="http://linedata.com/WS/Login/parts/1.0" schemaLocation="masteri_login.xsd" /> Do you have the masteri_login.xsd in the same folder as the WSDL is? Thanks, Raymond From: Ruault Gaetan Sent: Wednesday, March 31, 2010 2:33 AM To: user@tuscany.apache.org Subject: problem in @WebParam use by Tuscany Hi, I have a wsdl like this <definitions targetNamespace="http://linedata.com/WS/Login/1.0" xmlns:tns="http://linedata.com/WS/Login/1.0" xmlns:parts="http://linedata.com/WS/Login/parts/1.0" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <xsd:schema targetNamespace="http://linedata.com/WS/Login/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:import namespace="http://linedata.com/WS/Login/parts/1.0" schemaLocation="masteri_login.xsd" /> </xsd:schema> </types> <message name="LoginRequest"> <part name="parameters" element="parts:Login" /> </message> <message name="LoginResponse"> <part name="response" element="parts:LoginResp" /> </message> <message name="LoginFault"> <part name="LoginFault" element="parts:miFault" /> </message> <portType name="LoginPort"> <operation name="Login"> <documentation> Login description </documentation> <input message="tns:LoginRequest" /> <output message="tns:LoginResponse" /> <fault name="fault" message="tns:LoginFault" /> </operation> </portType> then when i generate java interface with wsimport with customization for SOAPBinding ParametersStyle BARE I Get an interface like this for the Login operation @WebMethod(operationName = "Login", action = "E69676F6C4F20514F43594D4A336F646") @WebResult(name = "LoginResp", partName = "response") public LoginResp login( @WebParam(name = "Login", targetNamespace = "http://linedata.com/WS/Login/parts/1.0", partName = "parameters") Login parameters) throws LoginFault; then when I launch a Tuscany application i get this error : GRAVE: Exception thrown was: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The XML schema element does not have a type: {http://linedata.com/WS/Login/parts/1.0}Login Exception in thread "main" org.osoa.sca.ServiceRuntimeException: org.apache.tuscany.sca.monitor.MonitorRuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The XML schema element does not have a type: {http://linedata.com/WS/Login/parts/1.0}Login at org.apache.tuscany.sca.node.impl.NodeImpl.analyzeProblems(NodeImpl.java:711) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:634) at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:200) at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178) at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100) at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182) at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) at Exec.main(Exec.java:14) Caused by: org.apache.tuscany.sca.monitor.MonitorRuntimeException: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The XML schema element does not have a type: {http://linedata.com/WS/Login/parts/1.0}Login ... 9 more Caused by: org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException: The XML schema element does not have a type: {http://linedata.com/WS/Login/parts/1.0}Login at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl$Wrapper.getChildElements(WSDLOperationIntrospectorImpl.java:375) at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl$Wrapper.getInputChildElements(WSDLOperationIntrospectorImpl.java:469) at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.isWrapperStyle(WSDLOperationIntrospectorImpl.java:113) at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getOperation(WSDLOperationIntrospectorImpl.java:228) at org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceIntrospectorImpl.getOperation(WSDLInterfaceIntrospectorImpl.java:84) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLInterfaceContract(BindingWSDLGenerator.java:335) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.createWSDLDocument(BindingWSDLGenerator.java:205) at org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator.generateWSDL(BindingWSDLGenerator.java:163) at org.apache.tuscany.sca.binding.ws.xml.BindingBuilderImpl.build(BindingBuilderImpl.java:48) at org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl.buildReferenceBindings(ComponentReferenceBindingBuilderImpl.java:56) at org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl.build(ComponentReferenceBindingBuilderImpl.java:46) at org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:271) at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.buildComposite(RuntimeBootStrapper.java:255) at org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:632) ... 7 more If i change interface Declaration like this (add "parts:" prefix for @WebParam Name) like in wsdl file: @WebMethod(operationName = "Login", action = "E69676F6C4F20514F43594D4A336F646") @WebResult(name = "LoginResp", partName = "response") public LoginResp login( @WebParam(name = "parts:Login", targetNamespace = "http://linedata.com/WS/Login/parts/1.0", partName = "parameters") Login parameters) throws LoginFault; it works fine....... i get the same error like my other mails : .... class fr.xx.xx.webservicemi.webservice.Login nor any of its super class is known to this context ... ... ... ..... then i think i found a bug but i don't know if it's on Tuscany implementation or in wsimport generation. thanks Gaetan