users@jaxb.java.net

Re: xsom usage question

From: Meredith Gregory <lgreg.meredith_at_gmail.com>
Date: Thu, 9 Oct 2008 10:27:28 -0700

Jaxbians,
i forgot to include the schema in question. Find it below.

Best wishes,

--greg

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://calculator.me.org/"
xmlns:tns="http://calculator.me.org/" xmlns:xs="
http://www.w3.org/2001/XMLSchema">

  <xs:element name="ArithmeticException" type="tns:ArithmeticException"/>

  <xs:element name="add" type="tns:add"/>

  <xs:element name="addResponse" type="tns:addResponse"/>

  <xs:element name="mult" type="tns:mult"/>

  <xs:element name="multResponse" type="tns:multResponse"/>

  <xs:complexType name="mult">
    <xs:sequence>
      <xs:element name="m" type="xs:int"/>
      <xs:element name="n" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="multResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:int" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ArithmeticException">
    <xs:sequence>
      <xs:element name="message" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="add">
    <xs:sequence>
      <xs:element name="i" type="xs:int"/>
      <xs:element name="j" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="addResponse">
    <xs:sequence>
      <xs:element name="return" type="xs:int"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>


On Thu, Oct 9, 2008 at 10:25 AM, Meredith Gregory
<lgreg.meredith_at_gmail.com>wrote:

> Jaxbians,
> i'm trying to follow this basic usage example<https://xsom.dev.java.net/userguide.html>and not getting much success. i'm calling the methods from scala, but that
> has never interfered with java behavior for me in the past. i've got a
> schema associated with a wsdl file (see below). i need to process it. i
> create an instance of
>
> scala> new com.sun.xml.xsom.parser.XSOMParser();
> new com.sun.xml.xsom.parser.XSOMParser();
> new com.sun.xml.xsom.parser.XSOMParser();
> res35: com.sun.xml.xsom.parser.XSOMParser =
> com.sun.xml.xsom.parser.XSOMParser_at_b8b79b
>
> scala>
>
> i get a file stream to the schema in question
>
> scala> new
> java.io.FileInputStream("/Users/lgm/work/src/projex/bobj/magritte/pipe-cutter/java/Webutron/CalculatorApp/build/generated/wsgen/service/resources/CalculatorWSService_schema1.xsd")
> new
> java.io.FileInputStream("/Users/lgm/work/src/projex/bobj/magritte/pipe-cutter/java/Webutron/CalculatorApp/build/generated/wsgen/service/resources/CalculatorWSService_schema1.xsd")
> new
> java.io.FileInputStream("/Users/lgm/work/src/projex/bobj/magritte/pipe-cutter/java/Webutron/CalculatorApp/build/generated/wsgen/service/resources/CalculatorWSService_schema1.xsd")
> res45: java.io.FileInputStream = java.io.FileInputStream_at_4fef8
>
> scala>
>
> i call parse and then ask for the result
>
> scala> res35.parse( res45 )
> res35.parse( res45 )
> res35.parse( res45 )
>
> scala> res35.getResult()
> res35.getResult()
> res35.getResult()
> res47: com.sun.xml.xsom.XSSchemaSet = null
>
> scala>
>
> As you can see the schema set is null. Any help would be greatly
> appreciated.
>
> Best wishes,
>
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com