-
1. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 6:37 AM (in response to thomas.diesler)Hello,
I posted a more extensive info about this error in the following topic:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=59526
I had some problems replying to this one before...
Best regards,
Georg -
2. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 6:40 AM (in response to thomas.diesler)
Here are some more info about the above problem. I use JBoss 4.0.1.
wscompile features are wsi,rpcliteral,useonewayoperations
I generate all code directly from my EE beans with xdoclet tags and the custom type get the following tag:* @wsee.jaxrpc-mapping * root-type-qname="BurritoTO" * namespace-uri="http://bullen.com/fleet/api/types"
The generated jaxrpc-mapping file is as follows:<?xml version="1.0" encoding="UTF-8"?> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd" version="1.1"> <package-mapping> <package-type>com.bullen.fleet.api.webservices.ejb</package-type> <namespaceURI>urn-com-bullen-fleet-api-webservices-ejb</namespaceURI> </package-mapping> <java-xml-type-mapping> <java-type>com.bullen.fleet.api.webservices.ejb.BurritoTO</java-type> <root-type-qname> BurritoTO </root-type-qname> <!-- qname support other than complex type not yet added --> <qname-scope>complexType</qname-scope> </java-xml-type-mapping> <!-- service interface mappings are still lacking --> <!-- service endpoint mappings are still lacking --> </java-wsdl-mapping>
...and the generated wsdl file is as follows...<?xml version="1.0" encoding="UTF-8"?> <definitions name="FleetAPI" targetNamespace="http://bullen.com/fleet/api" xmlns:tns="http://bullen.com/fleet/api" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://bullen.com/fleet/api/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <schema targetNamespace="http://bullen.com/fleet/api/types" xmlns:tns="http://bullen.com/fleet/api/type" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="BurritoTO"> <sequence> <element name="dip" type="string" nillable="true"/> <element name="extras" type="string" nillable="true"/> <element name="nr" type="int"/></sequence></complexType></schema></types> <message name="TacoBellService_orderBurrito"> <part name="int_1" type="xsd:int"/> <part name="String_2" type="xsd:string"/> <part name="String_3" type="xsd:string"/></message> <message name="TacoBellService_orderBurritoResponse"> <part name="result" type="ns2:BurritoTO"/></message> <message name="BurgerKingService_orderWhopper"> <part name="Integer_1" type="xsd:int"/></message> <message name="BurgerKingService_orderWhopperResponse"> <part name="result" type="xsd:string"/></message> <message name="LoginService_login"> <part name="String_1" type="xsd:string"/> <part name="String_2" type="xsd:string"/></message> <message name="LoginService_loginResponse"> <part name="result" type="xsd:string"/></message> <portType name="TacoBellService"> <operation name="orderBurrito" parameterOrder="int_1 String_2 String_3"> <input message="tns:TacoBellService_orderBurrito"/> <output message="tns:TacoBellService_orderBurritoResponse"/></operation></portType> <portType name="BurgerKingService"> <operation name="orderWhopper" parameterOrder="Integer_1"> <input message="tns:BurgerKingService_orderWhopper"/> <output message="tns:BurgerKingService_orderWhopperResponse"/></operation></portType> <portType name="LoginService"> <operation name="login" parameterOrder="String_1 String_2"> <input message="tns:LoginService_login"/> <output message="tns:LoginService_loginResponse"/></operation></portType> <binding name="TacoBellServiceBinding" type="tns:TacoBellService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="orderBurrito"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></input> <output> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></output></operation></binding> <binding name="BurgerKingServiceBinding" type="tns:BurgerKingService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="orderWhopper"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></input> <output> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></output></operation></binding> <binding name="LoginServiceBinding" type="tns:LoginService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="login"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></input> <output> <soap:body use="literal" namespace="http://bullen.com/fleet/api"/></output></operation></binding> <service name="FleetAPI"> <port name="TacoBellServicePort" binding="tns:TacoBellServiceBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port> <port name="BurgerKingServicePort" binding="tns:BurgerKingServiceBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port> <port name="LoginServicePort" binding="tns:LoginServiceBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
Do I need a ws4ee-mapping.xml file for the returned custom type?
Best regards,
Georg Hallingstrom -
3. Re: Prefixed namespace bindings may not be empty
thomas.diesler Feb 1, 2005 7:01 AM (in response to thomas.diesler)Please try to be as consice as possible. The original problem was
org.jboss.deployment.DeploymentException: Cannot deploy webservice; - nested throwable: (MBeanExcept ion: null Cause: org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed namespace bindings may not be empty.)
What is the content of the file is beeing parsed here? -
4. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 7:11 AM (in response to thomas.diesler)Hm... I guess that would be the wsdl file that I have included above...? That's the only place I have seen the 'ns2' being used.
/Georg13:03:35,837 INFO [EjbModule] Deploying BurgerKing 13:03:35,884 INFO [EjbModule] Deploying TacoBell 13:03:35,884 INFO [EjbModule] Deploying Login 13:03:36,025 INFO [EJBDeployer] Deployed: file:/C:/dev/jboss-4.0.1/server/dfol/ tmp/deploy/tmp11535bullen.ear-contents/api-webservices.jar 13:03:36,197 INFO [WSDLFilePublisher] WSDL published to: file:/C:/dev/jboss-4.0 .1/server/dfol/data/wsdl/bullen.ear/api-webservices.jar/FleetAPI.wsdl 13:03:36,384 INFO [STDOUT] [Fatal Error] :18:39: The value of the attribute "pr efix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed namespace bindings may not be empty. 13:03:36,384 ERROR [ServiceDeployer] Cannot startup webservice for: api-webservi ces.jar org.jboss.deployment.DeploymentException: Cannot deploy webservice; - nested thr owable: (MBeanException: null Cause: org.xml.sax.SAXParseException: The value of the attribute "prefix="xmlns",localpart="ns2",rawname="xmlns:ns2"" is invalid. Prefixed namespace bindings may not be empty.) at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeploye r.java:341) at org.jboss.webservice.ServiceDeployerEJB.deployWebservices(ServiceDepl oyerEJB.java:103) at org.jboss.webservice.ServiceDeployer.startWebservice(ServiceDeployer. java:201) at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeploy er.java:111) at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati onListenerProxy.java:138) at $Proxy24.handleNotification(Unknown Source) at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotificat ion(JBossNotificationBroadcasterSupport.java:112) at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotificatio n(JBossNotificationBroadcasterSupport.java:95) at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java ...
-
5. Re: Prefixed namespace bindings may not be empty
thomas.diesler Feb 1, 2005 7:16 AM (in response to thomas.diesler)Have you looked at the generated wsdd file?
data/wsdl/bullen.ear/api-webservices.jar/???.wsdd -
6. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 7:19 AM (in response to thomas.diesler)I do not have (get) this file...
/Georg -
7. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 7:20 AM (in response to thomas.diesler)The only file I have in the directory:
data/sedl/bullen.ear/api-webservices.jar
...is the wsdl file.
/Georg -
8. Re: Prefixed namespace bindings may not be empty
thomas.diesler Feb 1, 2005 7:38 AM (in response to thomas.diesler)Than thats the problem, an invalid axis deployment descriptor.
To debug this, run the WSDDGenerator standalone, like thisjava org.jboss.webservice.deployment.WSDDGenerator [wsdl] [jaxrpc-mapping]
-
9. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 10:22 AM (in response to thomas.diesler)Hello again,
the result from the WSDDGenerator:Exception in thread "main" java.lang.IllegalArgumentException: Multiple bindings for not supported for service: {http://bullen.com/fleet/api}FleetAPI at org.jboss.webservice.deployment.ServiceDescription.getWsdlBinding(Ser viceDescription.java:995) at org.jboss.webservice.deployment.ServiceDescription.<init>(ServiceDesc ription.java:122) at org.jboss.webservice.deployment.WSDDGenerator.main(WSDDGenerator.java :193)
Does this mean that only one<port>
can be decleared per<service>
?
/Georg -
10. Re: Prefixed namespace bindings may not be empty
thomas.diesler Feb 1, 2005 10:42 AM (in response to thomas.diesler)No it does not, you can specify the port name as the third parameter.
http://cvs.sourceforge.net/viewcvs.py/jboss/webservice/src/main/org/jboss/webservice/deployment/WSDDGenerator.java?rev=1.27&view=markup -
11. Re: Prefixed namespace bindings may not be empty
md5georg Feb 1, 2005 12:15 PM (in response to thomas.diesler)Ok... It looks like the Xdoclet tag (wsee.jaxrpc-mapping value: namespace-uri) is not substituted correctly as it is described in the jaxrpc-mapping_xml.xdt.
I am able to generate a wsdd file if I manually change the value in the jaxrpc-mapping file to the correct.
Hard coding the jaxrpc-mapping_xml.xdt to the correct value does little though... I still do not get JBoss to generate any wsdd file(s?) and it still gives me the "Prefixed namespace...." exception.
By the way... I can only generate the wsdd file if I give the port name. With no name given I get the following exception:C:\temp\slask>java -classpath "jboss-ws4ee.jar;axis-ws4ee.jar;commons-discovery. jar;commons-logging.jar;wsdl4j.jar;jboss-jaxrpc.jar;jboss-common.jar;jboss.jar;l og4j.jar;namespace.jar;xercesImpl.jar;xml-apis.jar" org.jboss.webservice.deploym ent.WSDDGenerator DynafleetAPI.wsdl jaxrpc-mapping.xml log4j:WARN No appenders could be found for logger (org.jboss.webservice.WSDLDefi nitionFactory). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.IllegalArgumentException: Multiple bindings for not supported for service: {http://bullen.com/fleet/api}FleetAPI at org.jboss.webservice.deployment.ServiceDescription.getWsdlBinding(Ser viceDescription.java:995) at org.jboss.webservice.deployment.ServiceDescription.<init>(ServiceDesc ription.java:122) at org.jboss.webservice.deployment.WSDDGenerator.main(WSDDGenerator.java :193)
Is this the correct behaviour?
Best regards,
Georg -
12. Re: Prefixed namespace bindings may not be empty
md5georg Feb 2, 2005 5:41 AM (in response to thomas.diesler)Hello,
finally I found the cause of the problem (thanks to the wsdd file searching). I used two Xdoclet tags on the returned complexType object:@wsee.jaxrpc-mapping root-type-qname="BurritoTO" namespace-uri="http://bullen.com/fleet/api/types"
Both these two tags messed up the jaxrpc-mappings.xml file so no wsdd files could be generated. When the jaxrpc-mapping tag's where removed it deployed well.
Thanks for all the help Thomas!
Best regards,
Georg Hallingström