Could you please paste or attach your logs? That may help me understand the problem better. I don't have use cases combining XML and JSON in my own projects but I know the code pretty well and I can probably help.
On Mon, Feb 17, 2025 at 5:23 AM Stefan Traud <stefan_tr...@yahoo.com> wrote: > Hi Robert > Using contract first with ADB, I continue to check feasibility to amend > our existing service with JSON support (based on XML Stream API with moshi). > > I'm currently struggling with xml types that include attributes. To > reproduce the issue I have amended the wsdl in the samples.quickstartadb to > include an attribute in the getPrice element: > > <xs:element name="getPrice"> > > <xs:complexType> > > <xs:sequence> > <xs:element name="symbol" > nillable="true" type="xs:string" /> > > </xs:sequence> > <xs:attribute name="currency" > type="xs:string" use="required"/> > > </xs:complexType> > > </xs:element> > > My corresponding JSON message should then be something like: > > { "getPrice" : {"@currency": "USD", "symbol": "IBM" }} > > However the parse method in the GetPrice ADBBean keeps complaining "Required > attribute currency is missing"; specifically this call returns null: > > reader.getAttributeValue("http://quickstart.samples/xsd", "currency"); > > (However it works when using SOAP). > > Do I need to define attributes differently in the JSON message? > > >