You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alexander Grivnin <ag...@mercury.com> on 2007/01/16 10:00:17 UTC

[Axis2] Explicit headers with JiBX

Hi Dennis,

 Thanks for the detailed axis2-JiBX wiki page!
 
 Do you know if headers are supported in the latest (1.1.1) release? I
tried to use explicit headers in a wsdl and there is a compilation error
saying that no mapping was defined for the header type. Should the
header be also in the mapping?

 Thanks for all your help,

 Alex

------------------------------

WSDL file:

...
<wsdl:message name="createResourcePoolsMessage">
		<wsdl:part name="part1"
element="rs:createResourcePools"/>
		<wsdl:part name="auditHeader"
element="common:AuditHeader"/>
</wsdl:message>
...

<wsdl:binding name="ResourceServiceSOAP11Binding"
type="rmMsg:ResourceServicePortType">
	<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
	<wsdl:operation name="createResourcePools">
<soap:operation soapAction="urn:createResourcePools" style="document"/>
		<wsdl:input>
			<soap:body use="literal"
namespace="http://mercury.com/ppm/rm/msg/1.0"/>
			<soap:header
message="rmMsg:createResourcePoolsMessage" part="auditHeader"
use="literal"/>
		</wsdl:input>
		<wsdl:output>
		<soap:body use="literal"
namespace="http://mercury.com/ppm/rm/msg/1.0"/>
		</wsdl:output>
	</wsdl:operation>
...

Exception:

[echo] wsdl file =
N:\Kintana\KntaDev\SourceCode\java\pm\webservices\conf\wsdl/ResourceServ
ice.wsdl
 [java] Retrieving schema at '../xsd/Resource.xsd', relative to
'file:/N:/Kintana/KntaDev/SourceCode/java/pm/webservices/conf/wsdl/'.
 [java] Retrieving schema at '../xsd/Common.xsd', relative to
'file:/N:/Kintana/KntaDev/SourceCode/java/pm/webservices/conf/xsd/Resour
ce.xsd'.
 [java] org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: No mapping defined for element
{http://mercury.com/ppm/common/1.0}AuditHeader
 [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:224)
 [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
 [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
 [java] Caused by: java.lang.RuntimeException: No mapping defined for
element {http://mercury.com/ppm/common/1.0}AuditHeader
 [java]     at
org.apache.axis2.jibx.CodeGenerationUtility.mapQName(CodeGenerationUtili
ty.java:928)
 [java]     at
org.apache.axis2.jibx.CodeGenerationUtility.mapMessage(CodeGenerationUti
lity.java:922)
 [java]     at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility
.java:340)
 [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 [java]     at java.lang.reflect.Method.invoke(Method.java:324)
 [java]     at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtensi
on.java:74)
 [java]     at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:177)
 [java]     ... 2 more

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org