go to post Robert Cemper · Jan 15, 2018 You may try to cheat it by changing the <input> tag to <input type=file size=30 name=FileStream onchange="javascript: alert(this.value);">and you get in CHROME and FirefoxC:\fakepath\EUR_Meldung.pdfand fakepath doesn't exist obviouslywhile IE11 and EDGE on Windows10 tell me the real path (!)C:\Users\ich\Desktop\EUR\EUR_Meldung.pdfI give no further comment related to security & privacy on products from M$
go to post Robert Cemper · Jan 15, 2018 OK, you look for something different than I understood.The CLASS REFERENCE to DocBook seems to be not directly available as in Studio.Just by external access to Documentation ....Part of it is found if you have an class in your editor and move your cursor over a class namethen you get a volatile class description that you can nail down by clicking or <F2>Its's pretty similar to the DocBook version EXCEPT that you have no further references (e.g. Data Types or %Status or ...)So it's not a multi level navigation like in browser!For illustration I have done this for %Persitent. For %Populate, %XML.Adaptor you have do again and again.
go to post Robert Cemper · Jan 15, 2018 Easier:in tab Server Explorer clickk to ADD NEW Sever Connection (green cross)
go to post Robert Cemper · Jan 15, 2018 Could you pls. be a little bit more precise in what context you expect the reference?A screenshot would be nice to explain your issue.
go to post Robert Cemper · Jan 12, 2018 To my understanding the structure of your global is irrelevant in this context.If you want to use sharding forget about ALL global access.You only access works over SQL ! (at least at the moment, objects may follow in some future)It's the decision of the sharing logic where and how data are stored in globals.If you ignore this and continue with direct global access you have a good chance to break it.
go to post Robert Cemper · Jan 8, 2018 This naming "mistake" of %ZEN caused a lot of extra checks and workarounds that we may have to carry around forever. My personal proposal "CSP#" written as CSPXX (CSPX was already used by Ensemble) didn't win the internal naming contest. Guess why.
go to post Robert Cemper · Jan 7, 2018 List of supported nnenmonics for ANSI terminals (X364) %X364 ; BINDING FOR ANSI X3.64 NAMESPACE, NOV/92 ; LRS952 06/07/05 APC ; Application program commandBEL ; Ring the bellCBT(%1) ; Cursor backward tabulation %1 tab stopsCCH ; Cancel characterCHA(%1) ; Cursor horizontal absolute (move to column %1)CHT(%1) ; Cursor horizontal tabulation (forward %1 tab stops)CNL(%1) ; Cursor next line (cursor down %1 lines)CPL(%1) ; Cursor preceding line (cursor up %1 lines)CPR ; Cursor position report (return in $KEY)CTC(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Cursor tabulation controlCUB(%1) ; Cursor backward %1 columnsCUD(%1) ; Cursor down %1 linesCUF(%1) ; Cursor forward %1 columnsCUP(%2,%1) ; Cursor position (column %1, line %2)CUU(%1) ; Cursor up %1 linesCVT(%1) ; Cursor vertical tabulationDAQ(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Define area qualificationDCH(%1) ; Delete %1 charactersDCS ; Device control stringDL(%1) ; Delete %1 linesDSR(%1) ; Device status report - type %1 - return in $KEYEA(%1) ; Erase in areaECH(%1) ; Erase %1 charactersED(%1) ; Erase in display (%1=0 cursor-to-end,1 begin-to-cursor,2 entire scr)EF(%1) ; Erase in fieldEL(%1) ; Erase in line (%1=0 cursor-to-end, 1 begin-to-cursor, 2 entire line)EPA ; End of protected areaESA ; End of selected areaHPA(%1) ; Horizontal position attribute (cursor to column %1)HPR(%1) ; Horizontal position relative (cursor forward %1 columns)HTJ ; Horizontal tab with justifyHTS ; Horizontal tabulation setHVP(%1,%2) ; Horizontal and vertical position (column %1, line %2)ICH(%1) ; Insert %1 charactersIL(%1) ; Insert %1 linesIND ; IndexINT ; InterruptMC ; Media copyMW ; Message waitingNEL ; Next lineNP(%1) ; Next page (advance %1 pages of terminal display memory)OSC ; Operating system commandPLD ; Partial line downPLU ; Partial line upPM ; Privacy messagePP(%1) ; Preceding page (backup %1 pages of terminal display memory)PU1 ; Private use onePU2 ; Private use twoREP ; RepeatRI ; Reverse indexRIS ; Reset to initial stateRM(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Reset modeSEM ; Select editing extent modeSGR(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Select graphic rendition %1 thru %9SM(%1,%2,%3,%4,%5,%6,%7,%8,%9) ; Set modeSPA ; Start of protected areaSS2 ; Single shift twoSS3 ; Single shift threeSSA ; Start of selected areaST ; String terminatorSTS ; Set transmit stateSU ; Scroll upTBC ; Tabulation clearVPA(%1) ; Vertical position attribute (move to row %1 at same column)VPR(%1) ; Vertical position relative (move down %1 lines at same column)VTS ; Vertical tabulation sets
go to post Robert Cemper · Jan 6, 2018 With this reply I'd bet om SOAP<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> ......But without details it's a guesswork. At least some schema for the content of PUT is required.What I've seen at UPS there are many interfaces. So which one is it ?
go to post Robert Cemper · Jan 6, 2018 This was more a code correction exercise. Honestly I wouldn't have done it that way at all. But using %XML.TextReader instead.It was just to late in the evening to do a pretty solution.The next auditor may do it. BTW. for Attributes it'S %lev+1*3
go to post Robert Cemper · Jan 5, 2018 pls. point me to that WSDL or post it so we can try.Without WSDL all to say isthe same what the error says: some important parameters are missing.The XML document is well formed but the document is not valid
go to post Robert Cemper · Jan 5, 2018 As Eduard already pointed out there is just no need to use %XML.Node as %XML.Document inherits it alreadyI have elaborated your code also to cover Attributes and Chlidren in the document.and added some readability features.To some extend %XML.TextReader could have done the same.No need to copy the code from browser the class + test data is attached. xmlreading.zip Class XML.J [ Abstract ]{ClassMethod GetXMLDocFromFile(file = "C:\InterSystems\Cache\mgr\user\Test.xml") As %XML.Document{ set reader=##class(%XML.Reader).%New() set status=reader.OpenFile(file) if $$$ISERR(status) {do $System.Status.DisplayError(status) quit $$$NULLOREF}#dim document as %XML.Document set document=reader.Document #; set reNo=##class(%XML.Node).%New() //check here #; set reNo.Document=document //check here #; do ..ShowNode(reNo) do ..ShowNamespaces(document)#dim node as %XML.Node set %lev=0 set node=document.GetDocumentElement() do ..Analyze(node) quit document}ClassMethod Analyze(node As %XML.Node){ set hasChild =..ShowNode(node) set attribute=node.FirstAttributeName() while attribute'="" { do ..ShowAttribute(.attribute,node) } if hasChild { set tSC=node.MoveToFirstChild(1) if tSC , $i(%lev) { while tSC { do ..Analyze(node) set tSC=node.MoveToNextSibling(1) } do node.MoveToParent() if $i(%lev,-1) } } quit}ClassMethod ShowAttribute(ByRef attribute, node As %XML.Node){ write !?(%lev+1*3),"Attribute_Name ",attribute ,!?(%lev+1*3),"Atribute_Value ",node.GetAttributeValue(attribute)#; more to be added here ,!?(%lev+1*3),"--------------------------" set attribute=node.NextAttributeName(attribute) quit}ClassMethod ShowNamespaces(doc As %XML.Document){ Set count=doc.CountNamespace() Write !, "Number of namespaces in document: "_count For i=1:1:count { Write !, "Namespace "_i_" is "_doc.GetNamespace(i)}}// how to use the below methodClassMethod ShowNode(node As %XML.Node) As %Boolean{ If node.NodeType=$$$xmlELEMENTNODE { Write !?(%lev*3),"LocalName="_node.LocalName#; Write !,"Namespace="_node.Namespace#; }#; If node.NodeType=$$$xmlELEMENTNODE {#; Write !,"NamespaceIndex="_node.NamespaceIndex Write !?(%lev*3),"Nil="_node.Nil Write !?(%lev*3),"NodeData="_node.NodeData Write !?(%lev*3),"QName="_node.QName } Write !?(%lev*3),"NodeId="_node.NodeId Write !?(%lev*3),"NodeType="_node.NodeType Write !?(%lev*3),"HasChildNodes returns "_node.HasChildNodes() If node.NodeType=$$$xmlELEMENTNODE { Write !?(%lev*3),"GetNumberAttributes returns "_node.GetNumberAttributes() Set status=node.GetText(.text) If status { Write !?(%lev*3), "Text of the node is "_$tr(text,$c(10)) } else { Write !?(%lev*3), "GetText does not return text" } } quit node.HasChildNodes()}}
go to post Robert Cemper · Jan 5, 2018 It seems to me you try to call a SOAP service.That service requires some special XML structured content. That is missing. It is typically placed in Authtoken.Entityyou can test your request by set tSc = AuthToken.Post("/webservices/Void",1) to see what you send.with is empty in your case.It may work with pure %Net.HttpReqquest but if you have a valid WSDL definition you better usethe WebService Client Generator in Caché Studio that does it all for you. It would be useful to have sour WSDL to try it. Pls. attach it.As I don't have a personal account on UPS I'n unable to identify what you a re trying to achieve.I worked also with PHP WS. It does a lot under cover (without your control) that you have to do in Caché by your own code.eg. at any request the related WDSL is downloaded for actual mapping.
go to post Robert Cemper · Jan 5, 2018 you should ensure that in the last else branch in method ..OutputNode() your variablealChild is an object of type %XML.Document to satify your method.. XmlToJSONnode(sbJSON As %AbstractStream, node As %XML.Document, showNodeName As %Boolean) when you call it.
go to post Robert Cemper · Jan 4, 2018 it just works with local variables in memory.I referred to this:USER>s ^rcc=sbJSONUSER>s x=^rccUSER>zw xx="6@%Stream.FileCharacter" USER>d x.%New()D x.%New()^<INVALID OREF>USER>
go to post Robert Cemper · Jan 4, 2018 I was wondering where this goes and how you could get so far.Caché uses a temp file. USER>set sbJSON =##class(%Stream.FileCharacter).%New()USER>s sc=sbJSON.WriteLine(12123) USER>zw scsc=1 USER>zw sbJSONsbJSON=<OBJECT REFERENCE>[6@%Stream.FileCharacter]+----------------- general information ---------------| oref value: 6| class name: %Stream.FileCharacter| reference count: 2+----------------- attribute values ------------------| (%Concurrency) = 1| %Location = "" <Set>| (%LockRef) = ""| (%Locked) = 0| AtEnd = 0| BOM = ""| (CurrFile) = "C:\InterSystems\17E20\mgr\Temp\mAiLCZXuPXOaSQ.stream"| Id = "" <Set>| LineTerminator = $c(13,10) <Set>| (MakePermLoc) = 1| (Mode) = 3|(NormalizedDirectory) = "C:\InterSystems\17E20\mgr\Temp\"|(OidTranslateTable) = 0| (ReadMode) = 0| ReadSize = ""| RemoveOnClose = 0| (StoreFile) = ""| StreamFormatWrite = 1| (TempFile) = "mAiLCZXuPXOaSQ.stream"| TranslateTable = "" <Set>| UseVMSVersion = 0| (VariableRecord) = 0+--------------- calculated references ---------------| CanonicalFilename <Get>| Filename <Get,Set>| LastModified <Get>| Size <Get>+----------------------------------------------------- USER>
go to post Robert Cemper · Jan 4, 2018 I 'm not aware of such option.I ran also the original class (with .$toJSOMFormat) in 2016.4 with the same effect.JSON output (trapped over I/O redirection) looks also good.I fear the huge XDATA block (HTML, JS, CSS) didn't make it correctly via the Studio import.It looked very strange with many empty lines inserted.
go to post Robert Cemper · Jan 4, 2018 correct! this is just a string looking like an oref, but no oref
go to post Robert Cemper · Jan 4, 2018 Analyzing you code I see the problem in this line: do sbJSON.WriteLine($C(92)_..SafeJSON(node.GetDocumentNode())_$C(92)_$C(58))I take for given that sbJSON is a valid object.So I further investigate on node ..XmlToJSONnode( ) is called twice + recursive#1 from .. XmlToJSON() looks fine#2 is suspicious as in .. OutputNode() I see Method OutputNode(childname As %String, alChild As %RegisteredObject, sbJSON As %Stream, showNodeName As %Boolean){ if (alChild = null) // EMPTY, NOT AN OBJECT { ... } elseif (alChild) // IT IS eventually an OBJECT REFERENCE { ... } else // NOT EMPTY, NOT NUMERIC, AND NOT AN OBJECT REFERENCE { do ..XmlToJSONnode(sbJSON,alChild, showNodeName); > > > > > > > > > > > > > > > > > > > >^^^^^^ // WHAT is this now ??? } do sbJSON.WriteLine($C(4))}so what you hand over is not an oref as this looks like <integer>@<classname> therefore you fail with <INVALID OREF>zXmlToJSONnode+3^SharpJSONToXML.1so some action is required to find out what happensBTW:passing sbJSON by reference would make this recursive construct easier to understandas you intend to work to the same stream object anyhow.or just use %sbJSON as single common reference
go to post Robert Cemper · Jan 4, 2018 with set tSc = AuthToken.Post("/webservices/Void")you miss some content to POST and get<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <soapenv:Fault> <faultcode>Client</faultcode> <faultstring>An exception has been raised as a result of client data.</faultstring> <detail> <err:Errors xmlns:err="http://www.ups.com/schema/xpci/1.0/error"> <err:ErrorDetail> <err:Severity>Hard</err:Severity> <err:PrimaryErrorCode> <err:Code>10001</err:Code> <err:Description>The XML document is not well formed</err:Description> <err:Digest>Unexpected element: CDATA</err:Digest> </err:PrimaryErrorCode> <err:Location/> </err:ErrorDetail> </err:Errors> </detail> </soapenv:Fault> </soapenv:Body></soapenv:Envelope>use insteadset tSc = AuthToken.Get("/webservices/Void")and receive<HTML><HEAD><TITLE>UPS Online Tools VoidWS</TITLE></HEAD><BODY><H2>Service Name: VoidWS<br>Remote User: null<br>Server Port: 443<br>Server Name: wwwcie.ups.com<br>Servlet Path: /Void<br></H2></BODY></HTML>