[JBoss JIRA] Updated: (JBWS-1281) When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java.
by Heiko Braun (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1281?page=all ]
Heiko Braun updated JBWS-1281:
------------------------------
Assignee: (was: Thomas Diesler)
> When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-1281
> URL: http://jira.jboss.com/jira/browse/JBWS-1281
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-jaxrpc
> Affects Versions: jbossws-1.0.2
> Environment: windows xp, linux, jdk1.5
> Reporter: George Gan
> Fix For: jbossws-2.0.0
>
> Attachments: SundayContentHandler.java
>
>
> When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java. I hacked to code to only compare the localpart:
> public void endElement(String namespaceURI, String localName, String qName)
> {
> ElementBinding elementBinding = null;
> QName endName = localName.length() == 0 ? new QName(qName) : new QName(namespaceURI, localName);
> StackItem item;
> while(true)
> {
> item = stack.peek();
> if(item.cursor == null)
> {
> if(item.ended)
> {
> pop();
> if(item.particle.isRepeatable())
> {
> endRepeatableParticle(item.particle);
> }
> }
> else
> {
> elementBinding = (ElementBinding)item.particle.getTerm();
> item.ended = true;
> break;
> }
> }
> else
> {
> if(!item.ended) // could be ended if it's a choice
> {
> endParticle(item, endName, 1);
> }
> ParticleBinding currentParticle = item.cursor.getCurrentParticle();
> TermBinding term = currentParticle.getTerm();
> if(term.isWildcard() && currentParticle.isRepeatable())
> {
> endRepeatableParticle(currentParticle);
> }
> pop();
> if(item.particle.isRepeatable())
> {
> endRepeatableParticle(item.particle);
> }
> }
> }
> if(elementBinding == null)
> {
> throw new JBossXBRuntimeException("Failed to endElement " + qName + ": binding not found");
> }
> //if(!elementBinding.getQName().equals(endName)) <--------------------------------------- hack starts here
> // GG hack only compare the local parts. In the case of the an element is nil,
> // there is no type prefix
> if(!endName.getLocalPart().equals( elementBinding.getQName().getLocalPart()))
> {
> throw new JBossXBRuntimeException("Failed to end element " +
> new QName(namespaceURI, localName) +
> ": element on the stack is " + elementBinding.getQName()
> );
> }
> endElement();
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[JBoss JIRA] Created: (JBWS-1335) Unmarshalling of SimpleTypes fails in jbossws-1.0.0.GA
by Igor Stuyver (JIRA)
Unmarshalling of SimpleTypes fails in jbossws-1.0.0.GA
------------------------------------------------------
Key: JBWS-1335
URL: http://jira.jboss.com/jira/browse/JBWS-1335
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jaxb
Affects Versions: jbossws-1.0.0
Environment: JBoss 4.0.4.GA/jbossws-1.0.0.GA/wscompile
Reporter: Igor Stuyver
This bug report is a follow up for http://jira.jboss.com/jira/browse/JBWS-761
We are experiencing simular problems but on JBoss 4.0.4.GA. The only difference is that we have an interface (created by XmlBeans) with the same package/classname JBossWS is looking for for mapping its simpleType.
We have following simple type declared:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="http://my.project/schema/common"
elementFormDefault="qualified">
<xs:simpleType name="LanguageCode">
<xs:restriction base="xs:string">
<xs:minLength value="2"/>
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
This simple type is used in the WSDL file and in a seperate XSD file. Of this seperate XSD file, XMLBeans (http://xmlbeans.apache.org/) are created for easy use of XML in our application.
We use an ejb-service-ref to call the webservice from an enterprise bean. In the response an element of type LanguageCode is present, in the generated POJO's (sun's wscompile) the element is declared as a String.
During unmarshalling of the xml, following error occurs:
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Neither fromValue(java.lang.String p) nor fromValue(java.lang.String p1, javax.xml.namespace.NamespaceContext p2) were found in interface project.my.schema.common.LanguageCode
at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtUtil.invokeUnmarshalMethod(RtUtil.java:522)
at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtCharactersHandler.unmarshal(RtCharactersHandler.java:104)
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:592)
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:130)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:271)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:137)
For me it seems that during unmarchalling, a class is searched to map the SimpleType to. Not a class but an interface is found and used from the created XMLBeans. The above exceptions is the result.
Following the SUN forum (http://forum.java.sun.com/thread.jspa?threadID=716435) the simple type should be mapped to the Java type the base type of the SimpleType is mapped to, String is this example. During unmarshalling JBossWS is still looking for a class to map the SimpleType to instead of mapping it to String directly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[JBoss JIRA] Updated: (JBWS-1624) JBossWS samples don't work with JMX authentication
by Heiko Braun (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1624?page=all ]
Heiko Braun updated JBWS-1624:
------------------------------
Component/s: productization
(was: jbossws-jaxws)
Priority: Optional (was: Major)
> JBossWS samples don't work with JMX authentication
> --------------------------------------------------
>
> Key: JBWS-1624
> URL: http://jira.jboss.com/jira/browse/JBWS-1624
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: productization
> Reporter: Thomas Diesler
> Assigned To: Thomas Diesler
> Priority: Optional
> Fix For: jbossws-2.0.0
>
>
> the JBossWS samples do not work when JMX authentication is activated (as it is when using the JBoss AS 4.0.5 installer per default, and as it anyway should always be!). For using the samples I had to disable JMX Authentication:
> Code:
> $ diff -u $JBOSS_HOME/server/default/deploy/jmx-invoker-service.xml~ jmx-invoker-service.xml
> --- C:\Programme\jboss-4.0.5.GA/server/default/deploy/jmx-invoker-service.xml~ 2006-12-13 09:27:32.
> 578125000 +0100
> +++ jmx-invoker-service.xml 2007-03-07 19:52:39.132619900 +0100
> @@ -102,8 +102,8 @@
> <return-type>java.lang.Object</return-type>
> <descriptors>
> <interceptors>
> - <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
> - securityDomain="java:/jaas/jmx-console"/>
> + <!-- interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
> + securityDomain="java:/jaas/jmx-console"/-->
> </interceptors>
> </descriptors>
> </operation>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months
[JBoss JIRA] Updated: (JBWS-1281) When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java.
by Heiko Braun (JIRA)
[ http://jira.jboss.com/jira/browse/JBWS-1281?page=all ]
Heiko Braun updated JBWS-1281:
------------------------------
Component/s: jbossws-jaxrpc
(was: jbossws-jaxws)
> When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-1281
> URL: http://jira.jboss.com/jira/browse/JBWS-1281
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: jbossws-jaxrpc
> Affects Versions: jbossws-1.0.2
> Environment: windows xp, linux, jdk1.5
> Reporter: George Gan
> Assigned To: Thomas Diesler
> Fix For: jbossws-2.0.0
>
> Attachments: SundayContentHandler.java
>
>
> When an element is nil, weblogic (8.1 sp3) sends an element with xsi:nil='1', however, it does not send type information with xsi:type=xxxx. It causes exception in org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.java. I hacked to code to only compare the localpart:
> public void endElement(String namespaceURI, String localName, String qName)
> {
> ElementBinding elementBinding = null;
> QName endName = localName.length() == 0 ? new QName(qName) : new QName(namespaceURI, localName);
> StackItem item;
> while(true)
> {
> item = stack.peek();
> if(item.cursor == null)
> {
> if(item.ended)
> {
> pop();
> if(item.particle.isRepeatable())
> {
> endRepeatableParticle(item.particle);
> }
> }
> else
> {
> elementBinding = (ElementBinding)item.particle.getTerm();
> item.ended = true;
> break;
> }
> }
> else
> {
> if(!item.ended) // could be ended if it's a choice
> {
> endParticle(item, endName, 1);
> }
> ParticleBinding currentParticle = item.cursor.getCurrentParticle();
> TermBinding term = currentParticle.getTerm();
> if(term.isWildcard() && currentParticle.isRepeatable())
> {
> endRepeatableParticle(currentParticle);
> }
> pop();
> if(item.particle.isRepeatable())
> {
> endRepeatableParticle(item.particle);
> }
> }
> }
> if(elementBinding == null)
> {
> throw new JBossXBRuntimeException("Failed to endElement " + qName + ": binding not found");
> }
> //if(!elementBinding.getQName().equals(endName)) <--------------------------------------- hack starts here
> // GG hack only compare the local parts. In the case of the an element is nil,
> // there is no type prefix
> if(!endName.getLocalPart().equals( elementBinding.getQName().getLocalPart()))
> {
> throw new JBossXBRuntimeException("Failed to end element " +
> new QName(namespaceURI, localName) +
> ": element on the stack is " + elementBinding.getQName()
> );
> }
> endElement();
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 9 months