namespaces again...

46 views
Skip to first unread message

Paulo "JCranky" Siqueira

unread,
Mar 28, 2012, 12:34:40 AM3/28/12
to sca...@googlegroups.com
Hi,

Sometime ago I mentioned that I was having problems with namespaces. I still have then, and I'm trying to understand why. Something that I found recently is that the xs:any that is in the wsdl I mentioned before is actually "formalized" with an xsd. But is some kind of indirect formalization. Yes, pretty strange.

Is there someway to cross those guys?

The XSDs in question can be found at https://www.fazenda.sp.gov.br/nfe/downloads/PL_006g.zip - its the consStatServ_v2.00.xsd inside the zip file.

If I understood correctly the problem, the outer element should have xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2" and the inner ones xml="http://www.portalfiscal.inf.br/nfe" - which is what happens in that sample response from before. Perhaps this mapping is what is missing, and not an eventual crossing of wsdls and xsds...

[]s,

--
Paulo "JCranky" Siqueira
Visit my blog: http://www.jcranky.com/

eugene yokota

unread,
Mar 28, 2012, 2:32:40 AM3/28/12
to sca...@googlegroups.com
Those specs are probably loosely related and not formalized.
You just need to call scalaxb.fromXML[A](xml) manually to convert it.

Not sure what the namespace problem is.

-eugene

Paulo "JCranky" Siqueira

unread,
Mar 28, 2012, 11:07:27 AM3/28/12
to sca...@googlegroups.com
You are right about they being loosely related, so I'm trying to manually combining then. My first try was this:

scalaxb -d status2 -p gen.nfe.statusservico --package-dir NfeStatusServico2.wsdl *.xsd

In other words, I'm trying to generate code for the WSDL and the XSDs (consStatServ_v2.00.xsd, leiauteConsStatServ_v2.00.xsd and tiposBasico_v1.03.xsd). Is this the correct way of doing it, or should I generate then separately?

Doing it like that makes everything goes "ka-boom":

[INFO]     at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:731)
[INFO]     at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4271)
[INFO]     at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4344)
[INFO]     at scala.tools.nsc.typechecker.Typers$Typer.typedIf$1(Typers.scala:3159)
[INFO]     at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3987)

I now get this error, in an infinite loop, when compiling. I also trying generating the XSDs classes in a separated folder, which the same results.

thanks,

[]s,

2012/3/28 eugene yokota <eed3...@gmail.com>

eugene yokota

unread,
Mar 29, 2012, 10:52:07 AM3/29/12
to sca...@googlegroups.com
I am seeing the same thing.
Maybe you can narrow down the xsd to the only ones you need.

As a long term solution, scalaxb should try to generate something smaller that scalac can handle.

-eugene

Paulo "JCranky" Siqueira

unread,
Mar 29, 2012, 2:38:44 PM3/29/12
to sca...@googlegroups.com
The 3 xsds I mentioned are inter-dependent, so I can't use less than those. For now, I'm generating the data for the schema manually.

btw, the namespace problem was completely by fault, I was filling some information with the wrong data XD

[]s,

2012/3/29 eugene yokota <eed3...@gmail.com>
Reply all
Reply to author
Forward
0 new messages